emacs-guix.texi 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414
  1. \input texinfo
  2. @setfilename emacs-guix.info
  3. @documentencoding UTF-8
  4. @settitle Emacs-Guix Reference Manual
  5. @copying
  6. This document describes Emacs-Guix, the Emacs interface for the
  7. @uref{https://www.gnu.org/software/guix/, GNU Guix} package manager.
  8. @quotation
  9. Copyright @copyright{} 2014-2018 Alex Kost@*
  10. Copyright @copyright{} 2018 Oleg Pykhalov
  11. Permission is granted to copy, distribute and/or modify this document
  12. under the terms of the GNU Free Documentation License, Version 1.3
  13. or any later version published by the Free Software Foundation;
  14. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  15. A copy of the license is available at
  16. @url{http://www.gnu.org/licenses/fdl.html}.
  17. @end quotation
  18. @end copying
  19. @dircategory Emacs
  20. @direntry
  21. * Emacs-Guix: (Emacs-Guix). Emacs interface for GNU Guix
  22. @end direntry
  23. @titlepage
  24. @title Emacs-Guix User Manual
  25. @author Alex Kost
  26. @page
  27. @vskip 0pt plus 1filll
  28. @insertcopying
  29. @end titlepage
  30. @contents
  31. @c ----------------------------------------------------------------
  32. @node Top
  33. @top Emacs-Guix
  34. @insertcopying
  35. @menu
  36. * Introduction:: Quick overview.
  37. * Installation:: Installing Emacs-Guix.
  38. * Package Management:: Managing packages and profile generations.
  39. * Package Licenses:: Interface for licenses of packages.
  40. * Package Locations:: Interface for locations of package source files.
  41. * Popup Interface:: Magit-like interface for guix commands.
  42. * Prettify Mode:: Abbreviating @file{/gnu/store/@dots{}} file names.
  43. * Build Log Mode:: Highlighting Guix build logs.
  44. * Completions:: Completing @command{guix} shell command.
  45. * Development:: Highlighting and tools for Guix code.
  46. * Hydra:: Interface for the Guix build farm.
  47. * List/Info Interface:: Describing ``list''/''info'' buffers.
  48. * Configuration:: Configuring Emacs-Guix.
  49. * Miscellaneous Commands:: @kbd{M-x guix-@dots{}} uncovered by other sections.
  50. * Help:: Help commands.
  51. Indexes
  52. * Concept Index:: Concepts.
  53. * Command Index:: Commands and functions.
  54. * Variable Index:: Variables.
  55. @end menu
  56. @c ----------------------------------------------------------------
  57. @node Introduction
  58. @chapter Introduction
  59. Emacs-Guix (also known as ``guix.el'') provides various interfaces and
  60. tools related to the GNU Guix package manager.
  61. @findex guix-about
  62. Call @kbd{M-x guix-about} to see a splash screen similar to
  63. @kbd{M-x@tie{}about-emacs}.
  64. Call @kbd{M-x guix-help} to get a summary of all the available
  65. commands (@pxref{Help}).
  66. In short, Emacs-Guix provides the following features:
  67. @itemize @bullet
  68. @item
  69. Interfaces for:
  70. @itemize @minus
  71. @item profiles (@pxref{Profiles})
  72. @item profile generations (@pxref{Generations})
  73. @item packages (@pxref{Packages})
  74. @item package licenses (@pxref{Package Licenses})
  75. @item package locations (@pxref{Package Locations})
  76. @item @uref{https://hydra.gnu.org, Hydra build farm} (@pxref{Hydra})
  77. @end itemize
  78. @item
  79. Magit-like popup interface for all guix shell commands
  80. (@pxref{Popup Interface}).
  81. @item
  82. Modes to view logs of package builds (@pxref{Build Log Mode}).
  83. @item
  84. Minor mode to ``prettify'' store file names (@pxref{Prettify Mode}).
  85. @item
  86. Shell completions for all guix commands and options
  87. (@pxref{Completions}).
  88. @item
  89. Minor mode with additional functionality for @code{scheme-mode} to
  90. work with Guix Scheme files (@pxref{Development}).
  91. @end itemize
  92. @c ----------------------------------------------------------------
  93. @node Installation
  94. @chapter Installation
  95. @cindex installation
  96. There are several ways to install Emacs-Guix:
  97. @itemize
  98. @item Installing using GNU Guix
  99. @example
  100. $ guix package -i emacs-guix
  101. @end example
  102. @item Installing from @uref{http://melpa.org/, MELPA}
  103. @item Using from a git checkout
  104. @end itemize
  105. For the first 2 options, you are all set, so you can skip this
  106. chapter. If you want to use Emacs-Guix from a git checkout, read
  107. further.
  108. @menu
  109. * Requirements:: Required and optional dependencies.
  110. * Using from Git:: Using without installation.
  111. @end menu
  112. @node Requirements
  113. @section Requirements
  114. Emacs-Guix depends on the following packages:
  115. @itemize
  116. @item
  117. @uref{http://www.gnu.org/software/emacs/, GNU Emacs}, version 24.3 or
  118. later.
  119. @item
  120. @uref{http://www.gnu.org/software/guix/, GNU Guix}, version 0.11.0 or
  121. later. You need it for the most features of Emacs-Guix, but not for
  122. all: Guix is not needed if you want to look at log files (@pxref{Build
  123. Log Mode}), to ``prettify'' store file names (@pxref{Prettify Mode}),
  124. or to receive some info from Hydra (@pxref{Hydra}).
  125. @item
  126. @uref{http://nongnu.org/geiser/, Geiser}, version 0.8 or later. It is
  127. used to communicate with the Guix daemon, and to receive various info
  128. from the Guix Guile code. So without Geiser, you can use the same
  129. features as without Guix.
  130. @item
  131. @uref{https://github.com/magnars/dash.el, dash library}, version
  132. 2.11.0 or later.
  133. @item
  134. @uref{https://github.com/alezost/bui.el, BUI library}, version 1.1.0
  135. or later. It is used to define various ``list''/``info'' interfaces
  136. (to display packages, generations, licenses, etc.).
  137. @item
  138. @uref{https://github.com/magit/magit, magit-popup library}. You
  139. already have this library if you use Magit 2.1.0 or later. This
  140. library is required only for @kbd{M-x@tie{}guix} command (@pxref{Popup
  141. Interface}).
  142. @item
  143. @uref{https://github.com/Fanael/edit-indirect, edit-indirect library},
  144. version 0.1.4 or later. It is used only to edit synopsis/description
  145. in @code{guix-devel-mode} with @kbd{C-c '} key binding
  146. (@pxref{Development}).
  147. @end itemize
  148. To sum up, most likely, you'll need all the above dependencies except
  149. maybe @code{magit-popup} and @code{edit-indirect}.
  150. @node Using from Git
  151. @section Using from Git
  152. You can use Emacs-Guix directly from a git checkout without any
  153. installation.
  154. At first, you need to clone the repository and to run
  155. @code{autogen.sh} script (it's just a wrapper for @code{autoreconf}
  156. command). If you don't have all dependencies installed, you may use
  157. @file{guix.scm} file to make an environment to build Emacs-Guix
  158. (@pxref{Invoking guix environment,,, guix, The GNU Guix Reference
  159. Manual}):
  160. @example
  161. $ git clone https://github.com/alezost/guix.el.git
  162. $ cd guix.el
  163. $ guix environment --pure --load=guix.scm
  164. $ ./autogen.sh
  165. @end example
  166. Now configure and make it (this will compile all Emacs-Lisp and Scheme
  167. files, and will generate @file{guix-autoloads.el} file):
  168. @example
  169. $ ./configure
  170. $ make
  171. @end example
  172. Now all you need, is to add @file{elisp} directory to the Emacs
  173. @code{load-path} and to load the generated autoloads. This can be
  174. done by adding the following code into your Emacs init file
  175. (@pxref{Init File,,, emacs, The GNU Emacs Manual}):
  176. @example
  177. (add-to-list 'load-path "/path/to/emacs-guix/elisp")
  178. (require 'guix-autoloads nil t)
  179. @end example
  180. Now, if you start Emacs, all @kbd{M-x guix-@dots{}} commands should
  181. become available.
  182. @node Using the Manual from Git
  183. @subsection Using the Manual from Git
  184. After ``make''-ing, the info manual is ready to use. You can run it,
  185. for example, with @kbd{C-u C-h i} command (the file is
  186. @file{doc/emacs-guix.info}). However it is not convenient. You may
  187. want to have this manual in the top info directory along with the
  188. other manuals. To make it possible, you need to do the following 2
  189. steps:
  190. @itemize
  191. @item
  192. At first, you need to add the doc directory to your Info path. One
  193. way to do it is to extend INFOPATH environment variable:
  194. @example
  195. export INFOPATH="/path/to/emacs-guix/doc$@{INFOPATH:+:@}$INFOPATH"
  196. @end example
  197. Alternatively, you can adjust Info path inside Emacs, like this:
  198. @example
  199. (with-eval-after-load 'info
  200. (info-initialize)
  201. (add-to-list 'Info-directory-list "/path/to/emacs-guix/doc"))
  202. @end example
  203. @item
  204. And secondly, the doc directory should contain @file{dir} file
  205. (@pxref{Directory File,,, texinfo, The GNU Texinfo Manual}). It can
  206. be generated simply by running the following command:
  207. @example
  208. make doc/dir
  209. @end example
  210. @end itemize
  211. Once the above 2 steps are done, @kbd{C-h i} should display the
  212. Emacs-Guix entry. Also you can use @kbd{M-x guix-info} command to run
  213. the manual (@pxref{Help}).
  214. @c ----------------------------------------------------------------
  215. @node Package Management
  216. @chapter Package Management
  217. Emacs-Guix provides a visual interface for routine package management
  218. tasks, pretty much like the @command{guix package} command
  219. (@pxref{Invoking guix package,,, guix, The GNU Guix Reference
  220. Manual}). Specifically, it makes it easy to:
  221. @itemize
  222. @item browse and display packages and generations;
  223. @item search, install, upgrade and remove packages;
  224. @item display packages from previous generations;
  225. @item do some other useful things.
  226. @end itemize
  227. @menu
  228. * Packages:: Interface for packages.
  229. * Profiles:: Interface for profiles.
  230. * Generations:: Interface for profile generations.
  231. @end menu
  232. @node Packages
  233. @section Packages
  234. @cindex packages
  235. There are multiple commands to display a list of Guix packages. You
  236. can either perform some actions in such ``package-list'' buffer, or
  237. ``describe'' package(s) with @kbd{@key{RET}} and do what you need in
  238. ``info'' buffer.
  239. @menu
  240. * Package Commands:: @kbd{M-x guix-@dots{}} to show packages.
  241. * Package Keys:: Key bindings in ``package-list'' buffer.
  242. * More Package Commands:: Other @kbd{M-x guix-@dots{}} related to packages.
  243. @end menu
  244. @node Package Commands
  245. @subsection Package Commands
  246. @vindex guix-current-profile
  247. @findex guix-set-current-profile
  248. All commands for displaying packages use the current profile
  249. (@code{guix-current-profile} variable), which can be changed with
  250. @kbd{M-x@tie{}guix-set-current-profile}. Alternatively, if you call
  251. any of the following commands with a prefix argument (@kbd{C-u}), you
  252. will be prompted for a profile just for that command.
  253. @table @kbd
  254. @findex guix-all-available-packages
  255. @item M-x guix-all-available-packages
  256. @findex guix-newest-available-packages
  257. @itemx M-x guix-newest-available-packages
  258. Display all/newest available packages.
  259. @findex guix-installed-packages
  260. @item M-x guix-installed-packages
  261. @findex guix-installed-user-packages
  262. @itemx M-x guix-installed-user-packages
  263. @findex guix-installed-system-packages
  264. @itemx M-x guix-installed-system-packages
  265. Display installed packages. As explained above, @kbd{M-x
  266. guix-installed-packages} uses an arbitrary profile that you can specify,
  267. while the other commands display packages installed in 2 special
  268. profiles: @file{~/.guix-profile} and @file{/run/current-system/profile}
  269. (only on GuixSD).
  270. @findex guix-obsolete-packages
  271. @item M-x guix-obsolete-packages
  272. Display obsolete or unknown packages (the packages that are installed
  273. in a profile but cannot be found among the available packages).
  274. @findex guix-superseded-packages
  275. @item M-x guix-superseded-packages
  276. Display packages that are superseded by the other packages.
  277. @findex guix-packages-by-name
  278. @item M-x guix-packages-by-name
  279. Display package(s) with the specified name.
  280. @findex guix-packages-by-license
  281. @item M-x guix-packages-by-license
  282. Display package(s) with the specified license.
  283. @findex guix-packages-by-location
  284. @item M-x guix-packages-by-location
  285. Display package(s) located in the specified file. These files usually
  286. have the following form: @file{gnu/packages/emacs.scm}, but don't type
  287. them manually! Press @kbd{@key{TAB}} to complete the file name.
  288. @findex guix-package-from-file
  289. @item M-x guix-package-from-file
  290. Display package that the code within the specified file evaluates to.
  291. @xref{Invoking guix package, @code{--install-from-file},, guix, The
  292. GNU Guix Reference Manual}, for an example of what such a file may
  293. look like.
  294. @findex guix-packages-from-system-config-file
  295. @item M-x guix-packages-from-system-config-file
  296. Display packages from the specified file with @code{operating-system}
  297. declaration (@pxref{Using the Configuration System,,, guix, The GNU
  298. Guix Reference Manual}).
  299. @findex guix-search-by-regexp
  300. @item M-x guix-search-by-regexp
  301. Search for packages by a specified regexp. By default ``name'',
  302. ``synopsis'' and ``description'' of the packages will be searched. This
  303. can be changed by modifying @code{guix-package-search-params} variable.
  304. @findex guix-search-by-name
  305. @item M-x guix-search-by-name
  306. Search for packages with names matching a specified regexp. This
  307. command is the same as @code{guix-search-by-regexp}, except only a
  308. package ``name'' is searched.
  309. @end table
  310. @vindex guix-package-list-type
  311. By default, these commands display each package @strong{output} on a
  312. separate line. If you prefer to see a list of packages---i.e., a list
  313. with a @strong{package} per line, use the following setting:
  314. @example
  315. (setq guix-package-list-type 'package)
  316. @end example
  317. @node Package Keys
  318. @subsection Package Keys
  319. @subsubsection List Buffer
  320. Along with the general ``list'' keys (@pxref{List buffer}), a
  321. ``package-list'' buffer additionally provides the following key
  322. bindings:
  323. @table @kbd
  324. @item i
  325. Mark the current package for installation.
  326. @item d
  327. Mark the current package for deletion.
  328. @item U
  329. Mark the current package for upgrading.
  330. @item ^
  331. Mark all obsolete packages for upgrading (with prefix, mark all
  332. installed packages for upgrading).
  333. @item x
  334. Execute actions on the marked packages.
  335. @item e
  336. Edit the definition of the current package (go to its location). This
  337. is similar to @command{guix edit} command (@pxref{Invoking guix
  338. edit,,, guix, The GNU Guix Reference Manual}), but for opening a
  339. package recipe in the current Emacs instance.
  340. @item G
  341. @cindex graph
  342. Show graph for the current package (@pxref{Graph Configuration}).
  343. @item z
  344. Show package size (@pxref{Invoking guix size,,, guix, The GNU Guix
  345. Reference Manual}).
  346. @item L
  347. Lint the current package (@pxref{Invoking guix lint,,, guix, The GNU
  348. Guix Reference Manual}). With prefix argument, you'll be prompted for
  349. checker names.
  350. @item B
  351. Display latest builds of the current package (@pxref{Hydra}).
  352. @end table
  353. @subsubsection Info Buffer
  354. Similarly, ``package-info'' buffer provides the following key bindings:
  355. @table @kbd
  356. @item i
  357. Install the current package.
  358. @item d
  359. Delete the current package.
  360. @item U
  361. Upgrade the current package.
  362. @item e
  363. Go to the package definition.
  364. @item G
  365. Show package graph.
  366. @item z
  367. Show package size.
  368. @item L
  369. Lint the package.
  370. @end table
  371. @node More Package Commands
  372. @subsection More Package Commands
  373. And some more commands related to packages:
  374. @table @kbd
  375. @cindex graph
  376. @findex guix-package-graph
  377. @item M-x guix-package-graph
  378. Show a package graph. You'll be prompted for a package name, graph
  379. backend and graph node type (everything can be completed with
  380. @kbd{@key{TAB}} key). @xref{Graph Configuration}, if you want to set
  381. an external graph viewer.
  382. @findex guix-package-size
  383. @item M-x guix-package-size
  384. Show a package size (@pxref{Invoking guix size,,, guix, The GNU Guix
  385. Reference Manual}). You'll be prompted for a package name and a size
  386. type (it should be either ``text'' or ``image'').
  387. @findex guix-package-lint
  388. @item M-x guix-package-lint
  389. Lint a package (@pxref{Invoking guix lint,,, guix, The GNU Guix
  390. Reference Manual}). You'll be prompted for a package name. With
  391. prefix argument, you'll be also prompted for checker names.
  392. @end table
  393. @node Profiles
  394. @section Profiles
  395. @cindex profiles
  396. @findex guix-profiles
  397. @vindex guix-profiles
  398. You can keep track of your Guix profiles with @kbd{M-x guix-profiles}
  399. command. By default, it displays only @file{~/.guix-profile} and a
  400. system profile (on GuixSD). But if you manage multiple profiles, you
  401. can add them by setting @code{guix-profiles} variable, for example,
  402. like this:
  403. @example
  404. (with-eval-after-load 'guix-ui-profile
  405. (setq guix-profiles
  406. (append '("/path/to/my-profile1"
  407. "/path/to/my-profile2")
  408. guix-profiles)))
  409. @end example
  410. Along with the general ``list'' keys (@pxref{List buffer}), a
  411. ``profile-list'' buffer additionally provides the following
  412. bindings:
  413. @table @kbd
  414. @item P
  415. Display packages installed in profile at point.
  416. @item G
  417. Display generations of profile at point.
  418. @item E
  419. Display ``search paths'' environment variables for the marked
  420. profiles, or the current profile if nothing is marked. This command
  421. is analogous to @code{guix package --search-paths} shell command
  422. (@pxref{Invoking guix package,,, guix, The GNU Guix Reference
  423. Manual}).
  424. @item c
  425. Make profile at point the current profile for the package commands
  426. (@pxref{Packages}).
  427. @end table
  428. @findex guix-apply-manifest
  429. Finally, you can use @kbd{M-x guix-apply-manifest} to apply a manifest
  430. file to the current profile or to a specified profile, if prefix
  431. argument is used. This has the same meaning as @code{--manifest}
  432. option (@pxref{Invoking guix package,,, guix, The GNU Guix Reference
  433. Manual}).
  434. @node Generations
  435. @section Generations
  436. @cindex generations
  437. Each Guix profile may have generations and Emacs-Guix allows you to
  438. display these generations, to switch to a particular generation, to
  439. look at the packages installed in it and to compare generations.
  440. @menu
  441. * Generation Commands:: @kbd{M-x guix-@dots{}} to show generations.
  442. * Generation Keys:: Key bindings in ``generation-list'' buffer.
  443. @end menu
  444. @node Generation Commands
  445. @subsection Generation Commands
  446. As with commands for displaying packages (@pxref{Package Commands}),
  447. commands for displaying generations use the current profile and can be
  448. called with a prefix argument.
  449. @table @kbd
  450. @findex guix-generations
  451. @item M-x guix-generations
  452. List all the generations.
  453. @findex guix-last-generations
  454. @item M-x guix-last-generations
  455. List the @var{N} last generations. You will be prompted for the number
  456. of generations.
  457. @findex guix-generations-by-time
  458. @item M-x guix-generations-by-time
  459. List generations matching time period. You will be prompted for the
  460. period using Org mode time prompt based on Emacs calendar (@pxref{The
  461. date/time prompt,,, org, The Org Manual}).
  462. @end table
  463. Analogously, on GuixSD you can also display system generations:
  464. @table @kbd
  465. @findex guix-system-generations
  466. @item M-x guix-system-generations
  467. @findex guix-last-system-generations
  468. @item M-x guix-last-system-generations
  469. @findex guix-system-generations-by-time
  470. @item M-x guix-system-generations-by-time
  471. @end table
  472. @node Generation Keys
  473. @subsection Generation Keys
  474. Along with the general ``list'' keys (@pxref{List buffer}), a
  475. ``generation-list'' buffer additionally provides the following
  476. bindings:
  477. @table @kbd
  478. @item P
  479. Display packages installed in the current generation.
  480. @item E
  481. Display ``search paths'' environment variables for the marked
  482. generations. This command is similar to the one for a list of
  483. profiles (@pxref{Profiles}).
  484. @item c
  485. Switch profile to the current generation.
  486. @item d
  487. Mark the current generation for deletion (with prefix, mark all
  488. generations).
  489. @item x
  490. Execute actions on the marked generations---i.e., delete generations.
  491. @item e
  492. Run Ediff (@pxref{Top,,, ediff, The Ediff Manual}) on package outputs
  493. installed in the 2 marked generations. With prefix argument, run Ediff
  494. on manifests of the marked generations.
  495. @item =
  496. Run Diff (@pxref{Diff Mode,,, emacs, The GNU Emacs Manual}) on package
  497. outputs installed in the 2 marked generations. With prefix argument,
  498. run Diff on manifests of the marked generations.
  499. @item +
  500. List package outputs added to the latest marked generation comparing
  501. with another marked generation.
  502. @item -
  503. List package outputs removed from the latest marked generation comparing
  504. with another marked generation.
  505. @end table
  506. @c ----------------------------------------------------------------
  507. @node Package Licenses
  508. @chapter Package Licenses
  509. @cindex package licenses
  510. If you want to browse the URL of a particular license, or to look at a
  511. list of licenses, you may use the following commands:
  512. @table @kbd
  513. @findex guix-browse-license-url
  514. @item M-x guix-browse-license-url
  515. Choose a license from a completion list to browse its URL using
  516. @code{browse-url} function (@pxref{Browse-URL,,, emacs, The GNU Emacs
  517. Manual}).
  518. @findex guix-licenses
  519. @item M-x guix-licenses
  520. Display a list of available licenses. You can press @kbd{P} key
  521. there to display packages with this license in the same way as
  522. @kbd{M-x@tie{}guix-packages-by-license} would do (@pxref{Package
  523. Commands}).
  524. @findex guix-find-license-definition
  525. @item M-x guix-find-license-definition
  526. Open @file{@dots{}/guix/licenses.scm} and move to the specified license.
  527. @end table
  528. @c ----------------------------------------------------------------
  529. @node Package Locations
  530. @chapter Package Locations
  531. @cindex package locations
  532. As you know, package definitions are placed in Guile files, also known
  533. as @dfn{package locations}. The following commands should help you not
  534. get lost in these locations:
  535. @table @kbd
  536. @findex guix-locations
  537. @item M-x guix-locations
  538. Display a list of package locations. You can press @kbd{P} or
  539. @kbd{@key{RET}} there to display packages placed in the current
  540. location in the same way as @kbd{M-x@tie{}guix-packages-by-location}
  541. would do (@pxref{Package Commands}). Note that when the point is on a
  542. location button, @kbd{@key{RET}} will open this location file.
  543. @findex guix-find-location
  544. @item M-x guix-find-location
  545. Open the given package definition source file (press @kbd{@key{TAB}}
  546. to choose a location from a completion list).
  547. @findex guix-edit
  548. @item M-x guix-edit
  549. Find location of a specified package. This is an Emacs analog of
  550. @command{guix edit} command (@pxref{Invoking guix edit,,, guix, The
  551. GNU Guix Reference Manual}). As with
  552. @kbd{M-x@tie{}guix-packages-by-name}, you can press @kbd{@key{TAB}} to
  553. complete a package name.
  554. @end table
  555. @vindex guix-directory
  556. If you are contributing to Guix, you may find it useful for
  557. @kbd{M-x@tie{}guix-find-location} and @kbd{M-x@tie{}guix-edit} to open
  558. locations from your Git checkout. This can be done by setting
  559. @code{guix-directory} variable. For example, after this:
  560. @example
  561. (setq guix-directory "~/src/guix")
  562. @end example
  563. @kbd{M-x guix-edit guix} opens
  564. @file{~/src/guix/gnu/packages/package-management.scm} file.
  565. Also you can use @kbd{C-u} prefix argument to specify a directory just
  566. for the current @kbd{M-x@tie{}guix-find-location} or
  567. @kbd{M-x@tie{}guix-edit} command.
  568. @vindex guix-read-package-name-function
  569. By default, when you should specify a package name (for example, after
  570. @kbd{M-x guix-edit}), you will be prompted for it in the minibuffer,
  571. but you can configure Emacs-Guix to use a package name at the current
  572. point position (unless @kbd{C-u} is used):
  573. @example
  574. (setq guix-read-package-name-function 'guix-read-package-name-at-point)
  575. @end example
  576. @c ----------------------------------------------------------------
  577. @node Popup Interface
  578. @chapter Popup Interface
  579. If you ever used Magit, you know what ``popup interface'' is
  580. (@pxref{Top,,, magit-popup, Magit-Popup User Manual}). Even if you are
  581. not acquainted with Magit, there should be no worries as it is very
  582. intuitive.
  583. @findex guix
  584. So @kbd{M-x@tie{}guix} command provides a top-level popup interface
  585. for all available guix commands. When you select an option, you'll be
  586. prompted for a value in the minibuffer. Many values have completions,
  587. so don't hesitate to press @kbd{@key{TAB}} key. Multiple values (for
  588. example, packages or lint checkers) should be separated by commas.
  589. After specifying all options and switches for a command, you may choose
  590. one of the available actions. The following default actions are
  591. available for all commands:
  592. @itemize
  593. @item
  594. Run the command in the Guix REPL. It is faster than running
  595. @code{guix@tie{}@dots{}} command directly in shell, as there is no
  596. need to run another guile process and to load required modules there.
  597. @item
  598. @vindex guix-run-in-shell-function
  599. Run the command in a shell buffer. You can set
  600. @code{guix-run-in-shell-function} variable to fine tune the shell buffer
  601. you want to use.
  602. @item
  603. Add the command line to the kill ring (@pxref{Kill Ring,,, emacs, The
  604. GNU Emacs Manual}).
  605. @end itemize
  606. @cindex graph
  607. Several commands (@command{guix graph}, @command{guix system
  608. shepherd-graph} and @command{guix system extension-graph}) also have a
  609. ``View graph'' action, which allows you to view a generated graph
  610. (@pxref{Graph Configuration}).
  611. @c ----------------------------------------------------------------
  612. @node Prettify Mode
  613. @chapter Guix Prettify Mode
  614. Emacs-Guix also comes with ``guix-prettify.el''. It provides a minor
  615. mode for abbreviating store file names by replacing hash sequences of
  616. symbols with ``@dots{}'':
  617. @example
  618. /gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1
  619. @result{} /gnu/store/…-foo-0.1
  620. @end example
  621. @table @kbd
  622. @findex guix-prettify-mode
  623. @item M-x guix-prettify-mode
  624. Enable/disable prettifying for the current buffer.
  625. @findex global-guix-prettify-mode
  626. @item M-x global-guix-prettify-mode
  627. Enable/disable prettifying globally.
  628. @end table
  629. If you wish to enable @code{global-guix-prettify-mode} automatically
  630. on Emacs start, you may do it by adding the following line to your
  631. Emacs init file:
  632. @example
  633. (add-hook 'after-init-hook 'global-guix-prettify-mode)
  634. @end example
  635. If you want to enable it only for specific major modes, add it to the
  636. mode hooks (@pxref{Hooks,,, emacs, The GNU Emacs Manual}), for example:
  637. @example
  638. (add-hook 'shell-mode-hook 'guix-prettify-mode)
  639. (add-hook 'dired-mode-hook 'guix-prettify-mode)
  640. @end example
  641. @c ----------------------------------------------------------------
  642. @node Build Log Mode
  643. @chapter Build Log Mode
  644. @cindex build log
  645. @findex guix-build-log-mode
  646. Emacs-Guix provides major and minor modes for highlighting build logs.
  647. So when you have a file with a package build output---for example, a
  648. file returned by @command{guix build --log-file @dots{}} command
  649. (@pxref{Invoking guix build,,, guix, The GNU Guix Reference Manual}),
  650. you may call @kbd{M-x@tie{}guix-build-log-mode} command in the buffer
  651. with this file. This major mode highlights some lines specific to
  652. build output and provides the following key bindings:
  653. @table @kbd
  654. @item M-n
  655. Move to the next build phase.
  656. @item M-p
  657. Move to the previous build phase.
  658. @item @key{TAB}
  659. Toggle (show/hide) the body of the current build phase.
  660. @item S-@key{TAB}
  661. Toggle (show/hide) the bodies of all build phases.
  662. @end table
  663. @findex guix-build-log-minor-mode
  664. There is also @kbd{M-x@tie{}guix-build-log-minor-mode} which also
  665. provides the same highlighting and the same key bindings as the major
  666. mode, but prefixed with @kbd{C-c}. You may find this minor mode
  667. useful for shell buffers (@pxref{Interactive Shell,,, emacs, The GNU
  668. Emacs Manual}). It can be enabled there like this:
  669. @example
  670. (add-hook 'shell-mode-hook 'guix-build-log-minor-mode)
  671. @end example
  672. @c ----------------------------------------------------------------
  673. @node Completions
  674. @chapter Shell Completions
  675. @cindex shell
  676. @cindex completions
  677. Another available feature is completing @command{guix} subcommands,
  678. options, packages and other things in @code{shell} (@pxref{Interactive
  679. Shell,,, emacs, The GNU Emacs Manual}) and @code{eshell}
  680. (@pxref{Top,,, eshell, Eshell: The Emacs Shell}) buffers.
  681. It works the same way as other completions do. Just press
  682. @kbd{@key{TAB}} when your intuition tells you.
  683. And here are some examples, where pressing @kbd{@key{TAB}} may
  684. complete something:
  685. @itemize @w{}
  686. @item @code{guix pa}@kbd{@key{TAB}}
  687. @item @code{guix package -}@kbd{@key{TAB}}
  688. @item @code{guix package --}@kbd{@key{TAB}}
  689. @item @code{guix package -i gei}@kbd{@key{TAB}}
  690. @item @code{guix build -L/tm}@kbd{@key{TAB}}
  691. @item @code{guix build --sy}@kbd{@key{TAB}}
  692. @item @code{guix build --system=i}@kbd{@key{TAB}}
  693. @item @code{guix system rec}@kbd{@key{TAB}}
  694. @item @code{guix lint --checkers=sy}@kbd{@key{TAB}}
  695. @item @code{guix lint --checkers=synopsis,des}@kbd{@key{TAB}}
  696. @item @code{guix graph --backend=}@kbd{@key{TAB}}
  697. @end itemize
  698. @c ----------------------------------------------------------------
  699. @node Development
  700. @chapter Development
  701. @findex guix-devel-mode
  702. If you often work with Guix package files, you may want to see some
  703. highlighting and to have some indentation rules specific for Guix
  704. keywords. There is a minor mode to help
  705. you---@kbd{M-x@tie{}guix-devel-mode}. It can be enabled in Scheme
  706. buffers like this:
  707. @example
  708. (add-hook 'scheme-mode-hook 'guix-devel-mode)
  709. @end example
  710. Along with highlighting and indentation, this minor mode provides the
  711. following key bindings:
  712. @table @kbd
  713. @item C-c . k
  714. Copy the name of the current Guile module into kill ring
  715. (@code{guix-devel-copy-module-as-kill}).
  716. @item C-c . u
  717. Use the current Guile module. Often after opening a Scheme file, you
  718. want to use a module it defines, so you switch to the Geiser REPL and
  719. write @code{,use (some module)} there. You may just use this command
  720. instead (@code{guix-devel-use-module}).
  721. @item C-c . b
  722. Build a package defined by the current variable definition. The
  723. building process is run in the current Geiser REPL. If you modified the
  724. current package definition, don't forget to reevaluate it before calling
  725. this command---for example, with @kbd{C-M-x} (@pxref{To eval or not to
  726. eval,,, geiser, Geiser User Manual})
  727. (@code{guix-devel-build-package-definition}).
  728. @item C-c . s
  729. Build a source derivation of the package defined by the current
  730. variable definition. This command has the same meaning as @code{guix
  731. build -S} shell command (@pxref{Invoking guix build,,, guix, The GNU
  732. Guix Reference Manual}) (@code{guix-devel-build-package-source}).
  733. @item C-c . d
  734. Download a source of the package defined by the current variable
  735. definition. This command is the same as running @code{guix download}
  736. shell command on the package source (@pxref{Invoking guix download,,,
  737. guix, The GNU Guix Reference Manual})
  738. (@code{guix-devel-download-package-source}).
  739. @item C-c . l
  740. Lint (check) a package defined by the current variable definition
  741. (@pxref{Invoking guix lint,,, guix, The GNU Guix Reference Manual})
  742. (@code{guix-devel-lint-package}).
  743. @item C-c '
  744. Edit @code{description} or @code{synopsis} of the current package in
  745. @code{texinfo-mode} (@code{guix-devel-code-block-edit}).
  746. @end table
  747. Unluckily, there is a limitation related to long-running REPL commands.
  748. When there is a running process in a Geiser REPL, you are not supposed
  749. to evaluate anything in a scheme buffer, because this will ``freeze''
  750. the REPL: it will stop producing any output (however, the evaluating
  751. process will continue---you will just not see any progress anymore). Be
  752. aware: even moving the point in a scheme buffer may ``break'' the REPL
  753. if Autodoc (@pxref{Autodoc and friends,,, geiser, Geiser User Manual})
  754. is enabled (which is the default).
  755. So you have to postpone editing your scheme buffers until the running
  756. evaluation will be finished in the REPL.
  757. Alternatively, to avoid this limitation, you may just run another Geiser
  758. REPL, and while something is being evaluated in the previous REPL, you
  759. can continue editing a scheme file with the help of the current one.
  760. @c ----------------------------------------------------------------
  761. @node Hydra
  762. @chapter Hydra
  763. @cindex hydra
  764. The continuous integration server at @code{hydra.gnu.org} builds all
  765. the distribution packages on the supported architectures and serves
  766. them as substitutes (@pxref{Substitutes,,, guix, The GNU Guix
  767. Reference Manual}). Continuous integration is currently orchestrated
  768. by @uref{https://nixos.org/hydra/, Hydra}.
  769. This section describes an Emacs interface to query Hydra to know the
  770. build status of specific packages, discover recent and ongoing builds,
  771. view build logs, and so on. This interface is mostly the same as the
  772. ``list''/``info'' interface for displaying packages and generations
  773. (@pxref{Package Management}).
  774. The following commands are available:
  775. @table @kbd
  776. @findex guix-hydra-latest-builds
  777. @vindex guix-hydra-number-of-builds
  778. @item M-x guix-hydra-latest-builds
  779. Display the latest failed or successful builds. With @kbd{C-u}, you
  780. will be prompted for the number of builds and other parameters
  781. (project, jobset, job and system). If you want to change the default
  782. number of builds, set @code{guix-hydra-number-of-builds} variable.
  783. @findex guix-hydra-queued-builds
  784. @item M-x guix-hydra-queued-builds
  785. Display scheduled or currently running builds.
  786. @findex guix-hydra-jobsets
  787. @item M-x guix-hydra-jobsets
  788. Display available jobsets (you will be prompted for a project).
  789. @end table
  790. In a list of builds you can press @kbd{L} key to display a build log of
  791. the current build. Also both a list of builds and a list of jobsets
  792. provide @kbd{B} key to display latest builds of the current job or
  793. jobset (don't forget about @kbd{C-u}).
  794. @c ----------------------------------------------------------------
  795. @node List/Info Interface
  796. @chapter List/Info Interface
  797. As you probably already know, there are multiple commands that display
  798. various lists (of packages, licenses, etc.). This is so-called
  799. ``list'' interface. Also you can get the same data displayed in
  800. ``info'' interface. This chapter describes these interfaces.
  801. @menu
  802. * List/Info Keys:: Common keys for both interfaces.
  803. * ``List'' buffer: List buffer. List-like interface.
  804. * ``Info'' buffer: Info buffer. Help-like interface.
  805. @end menu
  806. @node List/Info Keys
  807. @section List/Info Keys
  808. The following keys are available for both ``list'' and ``info''
  809. interfaces:
  810. @table @kbd
  811. @item h
  812. Show ``hint'' (a message with available key bindings).
  813. @item l
  814. @itemx r
  815. Go backward/forward by the history of the displayed results (this
  816. history is similar to the history of the Emacs @code{help-mode} or
  817. @code{Info-mode}).
  818. @item g
  819. Revert current buffer: update (receive it again) the currently
  820. displayed data and redisplay it.
  821. @item R
  822. Redisplay current buffer (without updating the data).
  823. @item ?
  824. Describe current mode.
  825. @end table
  826. Also some buffers provide the following keys:
  827. @table @kbd
  828. @item M
  829. Apply manifest file to the current profile (@pxref{Miscellaneous
  830. Commands, @code{guix-apply-manifest}}).
  831. @item C-c C-z
  832. @cindex Guix REPL
  833. Go to the Guix REPL (@pxref{The REPL,,, geiser, Geiser User Manual}).
  834. @end table
  835. @emph{Hint:} If you need several ``list'' or ``info'' buffers, you can
  836. simply @kbd{M-x@tie{}clone-buffer} them, and each buffer will have its
  837. own history.
  838. @node List buffer
  839. @section ``List'' buffer
  840. An interface of a ``list'' buffer is similar to the interface provided
  841. by ``package.el'' (@pxref{Package Menu,,, emacs, The GNU Emacs Manual}).
  842. And here are the default key bindings (some of them may be rebound
  843. to more specific commands):
  844. @table @kbd
  845. @item m
  846. Mark the current entry (with prefix, mark all entries).
  847. @item u
  848. Unmark the current entry (with prefix, unmark all entries).
  849. @item @key{DEL}
  850. Unmark backward.
  851. @item @key{RET}
  852. @itemx i
  853. Display ``info'' interface for the marked entries (or the current
  854. entry if nothing is marked).
  855. @item s
  856. Sort entries by column specified by the prefix argument (counting from
  857. 0).
  858. @end table
  859. @node Info buffer
  860. @section ``Info'' buffer
  861. The interface of an ``info'' buffer is similar to the interface of
  862. @code{help-mode} (@pxref{Help Mode,,, emacs, The GNU Emacs Manual}),
  863. or rather @code{Custom-mode} (@pxref{Easy Customization,,, emacs, The
  864. GNU Emacs Manual}), as it is full of various buttons that can be used
  865. to open files, browse URLs, do some actions (like installing/removing
  866. packages), etc.
  867. @cindex buttons
  868. As always, you may use @kbd{@key{TAB}} / @kbd{S-@key{TAB}} to move
  869. between buttons and @kbd{@key{RET}} to press a button, or you can just
  870. use mouse (@pxref{Mouse References,,, emacs, The GNU Emacs Manual}).
  871. Finally, you can copy any button label (a link to an URL or a file) by
  872. pressing @kbd{c} on a button.
  873. @c ----------------------------------------------------------------
  874. @node Configuration
  875. @chapter Configuration
  876. @cindex customization group
  877. There are many variables you can modify to change the appearance or
  878. behavior of Emacs-Guix. Some of these variables are described in this
  879. section. Also you can use Custom Interface (@pxref{Easy
  880. Customization,,, emacs, The GNU Emacs Manual}) to explore/set
  881. variables and faces---@kbd{M-x@tie{}customize-group @key{RET} guix}.
  882. @vindex guix-ENTRY-TYPE-BUFFER-TYPE-format
  883. If you wish to change the appearance of ``list'' / ``info'' buffers,
  884. look at @code{guix-ENTRY-TYPE-BUFFER-TYPE-format} variables
  885. (@dfn{ENTRY-TYPE} can be @code{package}, @code{output},
  886. @code{profile}, @code{generation} @code{system-generation},
  887. @code{license}, @code{location}, @code{hydra-build},
  888. @code{hydra-jobset}; @dfn{BUFFER-TYPE} is either @code{list} or
  889. @code{info}).
  890. @menu
  891. * Graph Configuration:: Set external viewer for graphs, etc.
  892. * Guile and Build Options:: Settings for Guix REPL, Guile, etc.
  893. * Buffer Names:: Names of Guix buffers.
  894. * Keymaps:: Configuring key bindings.
  895. @end menu
  896. @node Graph Configuration
  897. @section Graph Configuration
  898. @cindex graph
  899. Some commands may display a graph image. Currently Guix provides 2
  900. graph backends (@pxref{Invoking guix graph,,, guix, The GNU Guix
  901. Reference Manual}):
  902. @table @code
  903. @item d3js
  904. Such graph will be displayed in your browser using @code{browse-url}
  905. function (@pxref{Browse-URL,,, emacs, The GNU Emacs Manual}).
  906. @item graphviz
  907. Such graph will be displayed inside Emacs by default, but this can be
  908. configured @dots{}
  909. @end table
  910. @vindex guix-find-file-function
  911. @dots{} Graphs are opened using @code{guix-find-file-function}, so if
  912. you want to use an external viewer, you need to set this variable.
  913. Probably the easiest way to set an external viewer is to use a
  914. functionality provided by the Org Mode. For example, if you want to
  915. open the generated graphs (PNG files) with @code{sxiv} image viewer,
  916. you can do it like this:
  917. @example
  918. (setq guix-find-file-function 'org-open-file)
  919. (add-to-list 'org-file-apps '("\\.png\\'" . "sxiv %s"))
  920. @end example
  921. Now some deeper details and configuration options.
  922. @vindex guix-dot-program
  923. @vindex guix-dot-default-arguments
  924. @vindex guix-dot-file-name-function
  925. The @code{graphviz} graph is converted into an image file using
  926. @command{dot} command specified by @code{guix-dot-program} and
  927. @code{guix-dot-default-arguments} variables. By default, a PNG file is
  928. generated and saved as @file{/tmp/emacs-guix-XXXXXX/graph-XXXXXX.png}.
  929. If you want to change an output format (for example, into PDF), you also
  930. need to change @code{guix-dot-file-name-function} (to make @code{.pdf}
  931. extension of the output file). This can be done like this:
  932. @example
  933. (defun my-guix-pdf-graph ()
  934. "/tmp/my-current-guix-graph.pdf")
  935. (setq guix-dot-default-arguments '("-Tpdf")
  936. guix-dot-file-name-function 'my-guix-pdf-graph)
  937. @end example
  938. @node Guile and Build Options
  939. @section Guile and Build Options
  940. @table @code
  941. @vindex guix-guile-program
  942. @item guix-guile-program
  943. If you have some special needs for starting a Guile process, you may
  944. set this variable. For example, if you use Guix via
  945. @file{pre-inst-env} script (@pxref{Running Guix Before It Is
  946. Installed,,, guix, The GNU Guix Reference Manual}), you may customize
  947. this variable like this:
  948. @example
  949. (setq guix-guile-program
  950. '("/path/to/guix/pre-inst-env" "guile" "--no-auto-compile"))
  951. @end example
  952. Note: @code{--no-auto-compile} flag is recommended as auto-compilation
  953. of a ``dirty'' tree may take a very long time and may even lead to
  954. unpredictable errors.
  955. @vindex guix-use-substitutes
  956. @item guix-use-substitutes
  957. Has the same meaning as @code{--no-substitutes} option
  958. (@pxref{Invoking guix build,,, guix, The GNU Guix Reference
  959. Manual})---i.e., when non-nil, substitutes are enabled.
  960. @vindex guix-dry-run
  961. @item guix-dry-run
  962. Has the same meaning as @code{--dry-run} option (@pxref{Invoking guix
  963. build,,, guix, The GNU Guix Reference Manual})---i.e., when non-nil,
  964. do not build the derivations.
  965. @cindex Guix REPL
  966. @vindex guix-repl-use-server
  967. @item guix-repl-use-server
  968. By default, along with the main Guix REPL, an additional (internal)
  969. REPL is started. This allows you to display packages, generations and
  970. to receive other info from the Scheme side, while there is some active
  971. process in the main Guix REPL (e.g., while downloading or building
  972. packages). If you don't want to have the second REPL, set this
  973. variable to nil.
  974. @vindex guix-repl-use-latest
  975. @item guix-repl-use-latest
  976. Set this variable to nil, if you don't want to use the latest Guix
  977. code received with @code{guix pull} command (@pxref{Invoking guix
  978. pull,,, guix, The GNU Guix Reference Manual}).
  979. @end table
  980. @node Buffer Names
  981. @section Buffer Names
  982. Default names of various Emacs-Guix buffers (``*Guix@tie{}@dots{}*'')
  983. may be changed with the following variables:
  984. @table @code
  985. @vindex guix-ENTRY-TYPE-BUFFER-TYPE-buffer-name
  986. @item guix-ENTRY-TYPE-BUFFER-TYPE-buffer-name
  987. @xref{Configuration}, for the meaning of @code{ENTRY-TYPE} and
  988. @code{BUFFER-TYPE}.
  989. @vindex guix-ui-buffer-name-function
  990. @item guix-ui-buffer-name-function
  991. By default, many Guix buffers contain profile name (e.g., @code{*Guix
  992. Packages: <profile>*}). This variable allows you to control how this
  993. profile name is displayed. If you want to remove profile name from
  994. the buffer names, you can do it like this:
  995. @example
  996. (setq guix-ui-buffer-name-function 'guix-ui-buffer-name-simple)
  997. @end example
  998. @vindex guix-repl-buffer-name
  999. @item guix-repl-buffer-name
  1000. @vindex guix-internal-repl-buffer-name
  1001. @item guix-internal-repl-buffer-name
  1002. @vindex guix-search-paths-buffer-name
  1003. @item guix-search-paths-buffer-name
  1004. @vindex guix-help-buffer-name
  1005. @item guix-help-buffer-name
  1006. @vindex guix-about-buffer-name
  1007. @item guix-about-buffer-name
  1008. @end table
  1009. @node Keymaps
  1010. @section Keymaps
  1011. If you want to change default key bindings, look at the following
  1012. keymaps (@pxref{Init Rebinding,,, emacs, The GNU Emacs Manual}):
  1013. @table @code
  1014. @vindex guix-ui-map
  1015. @item guix-ui-map
  1016. Parent keymap with general keys for buffers used for Guix package
  1017. management.
  1018. @vindex guix-ENTRY-TYPE-BUFFER-TYPE-mode-map
  1019. @item guix-ENTRY-TYPE-BUFFER-TYPE-mode-map
  1020. @xref{Configuration}, for the meaning of @code{ENTRY-TYPE} and
  1021. @code{BUFFER-TYPE}.
  1022. @vindex guix-build-log-common-map
  1023. @item guix-build-log-common-map
  1024. @vindex guix-build-log-mode-map
  1025. @item guix-build-log-mode-map
  1026. @vindex guix-build-log-minor-mode-map
  1027. @item guix-build-log-minor-mode-map
  1028. @vindex guix-devel-keys-map
  1029. @item guix-devel-keys-map
  1030. @vindex guix-devel-mode-map
  1031. @item guix-devel-mode-map
  1032. @end table
  1033. @c ----------------------------------------------------------------
  1034. @node Miscellaneous Commands
  1035. @chapter Miscellaneous Commands
  1036. And some more commands that were not covered by the other chapters.
  1037. @table @kbd
  1038. @findex guix-pull
  1039. @item M-x guix-pull
  1040. It is the same as @command{guix pull} shell command (@pxref{Invoking
  1041. guix pull,,, guix, The GNU Guix Reference Manual}). With @kbd{C-u},
  1042. make it verbose.
  1043. @cindex Guix REPL
  1044. Once @command{guix pull} has succeeded, the Guix REPL is
  1045. restarted@footnote{Note that name/version pairs cannot be used to
  1046. identify packages (because a name is not necessarily unique), so
  1047. Emacs-Guix uses special identifiers that live only during a guile
  1048. session, so if the Guix REPL was restarted, you may want to revert
  1049. ``list'' buffer (by pressing @kbd{g}).}. This allows you to keep
  1050. using the Emacs interface with the updated Guix code.
  1051. @findex guix-hash
  1052. @item M-x guix-hash
  1053. Compute and copy to the kill ring (@pxref{Yanking,,, emacs, The GNU
  1054. Emacs Manual}) the SHA256 hash of a file (@pxref{Invoking guix hash,,,
  1055. guix, The GNU Guix Reference Manual}). With @kbd{C-u}, prompt for a
  1056. hash format.
  1057. If you call this command on a directory, its hash will be calculated
  1058. recursively without version-controlled files (so you can use this hash
  1059. in a package recipe).
  1060. @vindex guix-hash-support-dired
  1061. Finally, this command supports @code{dired-mode} (@pxref{Dired,,,
  1062. emacs, The GNU Emacs Manual}): whenever you run @kbd{M-x guix-hash} in
  1063. a Dired buffer, a hash of the current file will be calculated---i.e.,
  1064. you will not be prompted for a file name. If you wish to disable this
  1065. feature, set @code{guix-hash-support-dired} variable to nil.
  1066. @end table
  1067. @c ----------------------------------------------------------------
  1068. @node Help
  1069. @chapter Help
  1070. So many commands, so many buffers! This chapter describes few more
  1071. commands that should help you not to get lost.
  1072. @table @kbd
  1073. @findex guix-help
  1074. @item M-x guix-help
  1075. Display a buffer with the summary of the available Emacs-Guix
  1076. commands. Buttons in this buffer allow you to run commands and to
  1077. look at their docstrings and manual entries.
  1078. @findex guix-info
  1079. @item M-x guix-info
  1080. Show this Emacs-Guix info manual. With prefix argument, show the Guix
  1081. info manual.
  1082. @findex guix-switch-to-buffer
  1083. @item M-x guix-switch-to-buffer
  1084. Switch to one of the Emacs-Guix buffers. This is like a usual
  1085. @code{switch-to-buffer} (bound to @kbd{C-x b} by default), except it
  1086. completes only Guix buffers names. If you are going to use this
  1087. command, it is probably better to bind it to some key, for example:
  1088. @example
  1089. (global-set-key (kbd "C-x B") 'guix-switch-to-buffer)
  1090. @end example
  1091. @findex guix-extended-command
  1092. @item M-x guix-extended-command
  1093. Run Emacs-Guix command. This is like @kbd{M-x} (@pxref{M-x,,, emacs,
  1094. The GNU Emacs Manual}), except it completes only Guix command names.
  1095. And again, this is not a very useful command unless it is bound to
  1096. some key, for example:
  1097. @example
  1098. (global-set-key (kbd "M-X") 'guix-extended-command)
  1099. @end example
  1100. @end table
  1101. @c ----------------------------------------------------------------
  1102. @node Concept Index
  1103. @unnumbered Concept Index
  1104. @printindex cp
  1105. @node Command Index
  1106. @unnumbered Command Index
  1107. @printindex fn
  1108. @node Variable Index
  1109. @unnumbered Variable Index
  1110. @printindex vr
  1111. @bye