summaryrefslogtreecommitdiff
path: root/doc/emacs.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/emacs.texi')
-rw-r--r--doc/emacs.texi102
1 files changed, 74 insertions, 28 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 180037a88f..db2e657d27 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -1,29 +1,22 @@
@node Emacs Interface
-@section Emacs Interface
+@chapter Emacs Interface
@cindex Emacs
-GNU Guix comes with a visual user interface for GNU@tie{}Emacs, known
-as ``guix.el''. It can be used for routine package management tasks,
-pretty much like the @command{guix package} command (@pxref{Invoking
-guix package}). Specifically, ``guix.el'' makes it easy to:
-
-@itemize
-@item browse and display packages and generations;
-@item search, install, upgrade and remove packages;
-@item display packages from previous generations;
-@item do some other useful things.
-@end itemize
+GNU Guix comes with several useful modules (known as ``guix.el'') for
+GNU@tie{}Emacs which are intended to make an Emacs user interaction with
+Guix convenient and fun.
@menu
* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}.
-* Usage: Emacs Usage. Using the interface.
-* Configuration: Emacs Configuration. Configuring the interface.
+* Package Management: Emacs Package Management. Managing packages and generations.
+* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands.
* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names.
* Completions: Emacs Completions. Completing @command{guix} shell command.
@end menu
+
@node Emacs Initial Setup
-@subsection Initial Setup
+@section Initial Setup
On the Guix System Distribution (@pxref{GNU Distribution}), ``guix.el''
is ready to use, provided Guix is installed system-wide, which is the
@@ -43,6 +36,12 @@ later;
@uref{http://nongnu.org/geiser/, Geiser}, version 0.3 or later: it is
used for interacting with the Guile process.
+@item
+@uref{https://github.com/magit/magit/, magit-popup library}. You
+already have this library if you use Magit 2.1.0 or later. This library
+is an optional dependency---it is required only for @kbd{M-x@tie{}guix}
+command (@pxref{Emacs Popup Interface}).
+
@end itemize
When it is done ``guix.el'' may be configured by requiring a special
@@ -105,22 +104,32 @@ emacs, The GNU Emacs Manual}).
You can activate Emacs packages installed in your profile whenever you
want using @kbd{M-x@tie{}guix-emacs-load-autoloads}.
-@node Emacs Usage
-@subsection Usage
+
+@node Emacs Package Management
+@section Package Management
Once ``guix.el'' has been successfully configured, you should be able to
-use commands for displaying packages and generations. This information
-can be displayed in a ``list'' or ``info'' buffer.
+use a visual interface for routine package management tasks, pretty much
+like the @command{guix package} command (@pxref{Invoking guix package}).
+Specifically, it makes it easy to:
+
+@itemize
+@item browse and display packages and generations;
+@item search, install, upgrade and remove packages;
+@item display packages from previous generations;
+@item do some other useful things.
+@end itemize
@menu
* Commands: Emacs Commands. @kbd{M-x guix-@dots{}}
* General information: Emacs General info. Common for both interfaces.
* ``List'' buffer: Emacs List buffer. List-like interface.
* ``Info'' buffer: Emacs Info buffer. Help-like interface.
+* Configuration: Emacs Configuration. Configuring the interface.
@end menu
@node Emacs Commands
-@subsubsection Commands
+@subsection Commands
All commands for displaying packages and generations use the current
profile, which can be changed with
@@ -191,7 +200,7 @@ Once @command{guix pull} has succeeded, the Guix REPL is restared. This
allows you to keep using the Emacs interface with the updated Guix.
@node Emacs General info
-@subsubsection General information
+@subsection General information
The following keys are available for both ``list'' and ``info'' types of
buffers:
@@ -235,7 +244,7 @@ was restarted, you may want to revert ``list'' buffer (by pressing
@kbd{g}).
@node Emacs List buffer
-@subsubsection ``List'' buffer
+@subsection ``List'' buffer
An interface of a ``list'' buffer is similar to the interface provided
by ``package.el'' (@pxref{Package Menu,,, emacs, The GNU Emacs Manual}).
@@ -310,7 +319,7 @@ with another marked generation.
@end table
@node Emacs Info buffer
-@subsubsection ``Info'' buffer
+@subsection ``Info'' buffer
The interface of an ``info'' buffer is similar to the interface of
@code{help-mode} (@pxref{Help Mode,,, emacs, The GNU Emacs Manual}).
@@ -484,12 +493,49 @@ Various settings for ``info'' buffers.
@end table
+@node Emacs Popup Interface
+@section Popup Interface
+
+If you ever used Magit, you know what ``popup interface'' is
+(@pxref{Top,,, magit-popup, Magit-Popup User Manual}). Even if you are
+not acquainted with Magit, there should be no worries as it is very
+intuitive.
+
+So @kbd{M-x@tie{}guix} command provides a top-level popup interface for
+all available guix commands. When you select an option, you'll be
+prompted for a value in the minibuffer. Many values have completions,
+so don't hesitate to press @key{TAB} key. Multiple values (for example,
+packages or lint checkers) should be separated by commas.
+
+After specifying all options and switches for a command, you may choose
+one of the available actions. The following default actions are
+available for all commands:
+
+@itemize
+
+@item
+Run the command in the Guix REPL. It is faster than running
+@code{guix@tie{}@dots{}} command directly in shell, as there is no
+need to run another guile process and to load required modules there.
+
+@item
+Run the command in a shell buffer. You can set
+@code{guix-run-in-shell-function} variable to fine tune the shell buffer
+you want to use.
+
+@item
+Add the command line to the kill ring (@pxref{Kill Ring,,, emacs, The
+GNU Emacs Manual}).
+
+@end itemize
+
+
@node Emacs Prettify
-@subsection Guix Prettify Mode
+@section Guix Prettify Mode
-Along with ``guix.el'', GNU@tie{}Guix comes with ``guix-prettify.el''.
-It provides a minor mode for abbreviating store file names by replacing
-hash sequences of symbols with ``@dots{}'':
+GNU@tie{}Guix also comes with ``guix-prettify.el''. It provides a minor
+mode for abbreviating store file names by replacing hash sequences of
+symbols with ``@dots{}'':
@example
/gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1
@@ -526,7 +572,7 @@ mode hooks (@pxref{Hooks,,, emacs, The GNU Emacs Manual}), for example:
@node Emacs Completions
-@subsection Shell Completions
+@section Shell Completions
Another feature that becomes available after configuring Emacs interface
(@pxref{Emacs Initial Setup}) is completing of @command{guix}