2 @section Emacs Interface
5 GNU Guix comes with a visual user interface for GNU@tie{}Emacs, known
6 as ``guix.el''. It can be used for routine package management tasks,
7 pretty much like the @command{guix package} command (@pxref{Invoking
8 guix package}). Specifically, ``guix.el'' makes it easy to:
11 @item browse and display packages and generations;
12 @item search, install, upgrade and remove packages;
13 @item display packages from previous generations;
14 @item do some other useful things.
18 * Initial Setup: emacs Initial Setup. Preparing @file{~/.emacs}.
19 * Usage: emacs Usage. Using the interface.
20 * Configuration: emacs Configuration. Configuring the interface.
23 @node emacs Initial Setup
24 @subsection Initial Setup
26 To be able to use ``guix.el'', you need to install the following
31 @uref{http://www.gnu.org/software/emacs/, GNU Emacs}, version 24.3 or
35 @uref{http://nongnu.org/geiser/, Geiser}, version 0.3 or later: it is
36 used for interacting with the Guile process.
40 When it is done, add the following into your init file (@pxref{Init
41 File,,, emacs, The Emacs Editor}):
44 (require 'guix-init nil t)
47 However there is a chance that @code{load-path} of your Emacs does not
48 contain a directory with ``guix.el'' (usually it is
49 @file{/usr/share/emacs/site-lisp/}). In that case you need to add it
50 before requiring (@pxref{Lisp Libraries,,, emacs, The Emacs Editor}):
53 (add-to-list 'load-path "/path/to/directory-with-guix.el")
57 Do not worry about the efficiency of that @code{require} thing. It will
58 not load the whole ``guix.el'' package, it will just autoload the main
59 interactive commands (@pxref{Autoload,,, elisp, Emacs Lisp}).
65 Once ``guix.el'' has been successfully configured, you should be able to
66 use commands for displaying packages and generations. This information
67 can be displayed in a ``list'' or ``info'' buffer.
70 * Commands: emacs Commands. @kbd{M-x guix-@dots{}}
71 * General information: emacs General info. Common for both interfaces.
72 * ``List'' buffer: emacs List buffer. List-like interface.
73 * ``Info'' buffer: emacs Info buffer. Help-like interface.
77 @subsubsection Commands
79 You may use the following commands to display packages and generations:
82 @item M-x guix-all-available-packages
83 @itemx M-x guix-newest-available-packages
84 Display all/newest available packages.
86 @item M-x guix-installed-packages
87 Display all packages installed in the current profile.
89 @item M-x guix-obsolete-packages
90 Display obsolete packages (the packages that are installed in the
91 current profile but cannot be found among available packages).
93 @item M-x guix-search-by-name
94 Display package(s) with the specified name.
96 @item M-x guix-search-by-regexp
97 Search for packages by a specified regexp. By default ``name'',
98 ``synopsis'' and ``description'' of the packages will be searched. This
99 can be changed by modifying @code{guix-search-params} variable.
101 @item M-x guix-generations
102 List generations for the current profile. With numeric prefix, show so
103 many last generations.
107 It is possible to change the currently used profile with
108 @kbd{M-x@tie{}guix-set-current-profile}. This has the same effect as
109 specifying @code{--profile} option for @command{guix package}
110 (@pxref{Invoking guix package}).
112 @node emacs General info
113 @subsubsection General information
115 The following keys are available for both ``list'' and ``info'' types of
121 Go backward/forward by the history of the displayed results (this
122 history is similar to the history of the Emacs @code{help-mode} or
126 Revert current buffer: update information about the displayed
127 packages/generations and redisplay it.
130 Redisplay current buffer (without updating information).
133 Go to the Guix REPL (@pxref{The REPL,,, geiser, Geiser User Manual}).
137 Describe current mode to see all available bindings.
141 @emph{Hint:} If you need several ``list'' or ``info'' buffers, you can
142 simlpy @kbd{M-x clone-buffer} them, and each buffer will have its own
145 @emph{Warning:} Name/version pairs cannot be used to identify packages
146 (because a name is not necessarily unique), so ``guix.el'' uses special
147 identifiers that live only during a guile session, so if the Guix REPL
148 was restarted, you may want to revert ``list'' buffer (by pressing
151 @node emacs List buffer
152 @subsubsection ``List'' buffer
154 An interface of a ``list'' buffer is similar to the interface provided
155 by ``package.el'' (@pxref{Package Menu,,, emacs, The Emacs Editor}).
157 Default key bindings available for both ``package-list'' and
158 ``generation-list'' buffers:
162 Mark the current entry.
166 Unmark the current entry (with prefix, unmark all entries).
170 Sort entries by a specified column.
173 A ``package-list'' buffer additionally provides the following bindings:
177 Describe marked packages (display available information in a
178 ``package-info'' buffer).
180 Mark "out" of the current package for installation (with prefix, prompt
181 for output(s) to install).
183 Mark all installed outputs of the current package for deletion (with
184 prefix, prompt for output(s) to delete).
186 Mark all installed outputs of the current package for upgrading (with
187 prefix, prompt for output(s) to upgrade).
189 Mark all obsolete packages for upgrading.
191 Execute actions on marked packages.
194 A ``generation-list'' buffer additionally provides the following
199 List packages installed in the current generation.
201 Describe marked generations (display available information in a
202 ``generation-info'' buffer).
205 @node emacs Info buffer
206 @subsubsection ``Info'' buffer
208 The interface of an ``info'' buffer is similar to the interface of
209 @code{help-mode} (@pxref{Help Mode,,, emacs, The Emacs Editor}).
211 ``Info'' buffer contains some buttons (as usual you may use @key{TAB} /
212 @kbd{S-@key{TAB}} to move between buttons---@pxref{Mouse References,,,
213 emacs, The Emacs Editor}) which can be used to:
216 @item (in a ``package-info'' buffer)
219 @item install/remove a package;
220 @item jump to a package location;
221 @item browse home page of a package;
222 @item describe packages from ``Inputs'' fields.
225 @item (in a ``generation-info'' buffer)
228 @item remove a generation;
229 @item list packages installed in a generation;
230 @item jump to a generation directory.
236 @node emacs Configuration
237 @subsection Configuration
239 There are many variables you can modify to change the appearance or
240 behavior of Emacs user interface. Some of these variables are described
241 in this section. Also you can use Custom Interface (@pxref{Easy
242 Customization,,, emacs, The Emacs Editor}) to explore/set variables (not
246 * Guile and Build Options: emacs Build Options. Specifying how packages are built.
247 * Keymaps: emacs Keymaps. Configuring key bindings.
248 * Appearance: emacs Appearance. Settings for visual appearance.
251 @node emacs Build Options
252 @subsubsection Guile and Build Options
255 @item guix-guile-program
256 If you have some special needs for starting a Guile process, you may set
257 this variable, for example:
260 (setq guix-guile-program '("/bin/guile" "--no-auto-compile"))
263 @item guix-use-substitutes
264 Has the same meaning as @code{--no-substitutes} option (@pxref{Invoking
268 Has the same meaning as @code{--dry-run} option (@pxref{Invoking guix
274 @subsubsection Keymaps
276 If you want to change default key bindings, use the following keymaps
277 (@pxref{Init Rebinding,,, emacs, The Emacs Editor}):
280 @item guix-list-mode-map
281 Parent keymap with general keys for ``list'' buffers.
283 @item guix-package-list-mode-map
284 Keymap with specific keys for ``package-list'' buffers.
286 @item guix-generation-list-mode-map
287 Keymap with specific keys for ``generation-list'' buffers.
289 @item guix-info-mode-map
290 Parent keymap with general keys for ``info'' buffers.
292 @item guix-package-info-mode-map
293 Keymap with specific keys for ``package-info'' buffers.
295 @item guix-generation-info-mode-map
296 Keymap with specific keys for ``generation-info'' buffers.
300 @node emacs Appearance
301 @subsubsection Appearance
303 You can change almost any aspect of ``list'' / ``info'' buffers using
304 the following variables:
307 @item guix-list-column-format
308 @itemx guix-list-column-titles
309 @itemx guix-list-column-value-methods
310 Specify the columns, their names, what and how is displayed in ``list''
313 @item guix-info-displayed-params
314 @itemx guix-info-insert-methods
315 @itemx guix-info-ignore-empty-vals
316 @itemx guix-info-param-title-format
317 @itemx guix-info-multiline-prefix
318 @itemx guix-info-indent
319 @itemx guix-info-fill-column
320 @itemx guix-info-delimiter
321 Various settings for ``info'' buffers.