summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-01 21:52:58 +0300
committerAlex Kost <alezost@gmail.com>2016-04-18 10:09:02 +0300
commitb5e3cbbb248f3f5096c9d83d9db586db08d52b04 (patch)
tree9b0bcb2b18f7a9be33a27420c19d3453a689f723
parente81a89d176a7330c22e263a000754cfa2b62476d (diff)
doc: emacs: Add "Package Source Locations" section.
* doc/emacs.texi (Emacs Commands): Move description of 'guix-edit' command to... (Emacs Package Locations): ... here. Document 'guix-find-location'. New node. * doc/guix.texi (Top): Add it.
-rw-r--r--doc/emacs.texi63
-rw-r--r--doc/guix.texi1
2 files changed, 40 insertions, 24 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 3916aa62a7b..a4f77a1ca86 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -10,6 +10,7 @@ Guix convenient and fun.
10* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}. 10* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}.
11* Package Management: Emacs Package Management. Managing packages and generations. 11* Package Management: Emacs Package Management. Managing packages and generations.
12* Licenses: Emacs Licenses. Interface for licenses of Guix packages. 12* Licenses: Emacs Licenses. Interface for licenses of Guix packages.
13* Package Source Locations: Emacs Package Locations. Interface for package location files.
13* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. 14* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands.
14* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. 15* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names.
15* Build Log Mode: Emacs Build Log. Highlighting Guix build logs. 16* Build Log Mode: Emacs Build Log. Highlighting Guix build logs.
@@ -222,30 +223,6 @@ With @kbd{C-u}, make it verbose.
222Once @command{guix pull} has succeeded, the Guix REPL is restared. This 223Once @command{guix pull} has succeeded, the Guix REPL is restared. This
223allows you to keep using the Emacs interface with the updated Guix. 224allows you to keep using the Emacs interface with the updated Guix.
224 225
225Finally, there is an Emacs variant of @command{guix edit} command
226(@pxref{Invoking guix edit}):
227
228@table @kbd
229@item M-x guix-edit
230As with @kbd{M-x guix-packages-by-name}, you can press @key{TAB} to
231complete a package name.
232@end table
233
234If you are contributing to Guix, you may find it useful for @kbd{M-x
235guix-edit} to open package files from your git directory. This can be
236done by setting @code{guix-directory} variable. For example, after
237this:
238
239@example
240(setq guix-directory "~/src/guix")
241@end example
242
243@kbd{M-x guix-edit guix} opens
244@file{~/src/guix/gnu/packages/package-management.scm} file.
245
246Also you can use @kbd{C-u} prefix argument to specify a directory just
247for the current @kbd{M-x guix-edit} command.
248
249 226
250@node Emacs General info 227@node Emacs General info
251@subsection General information 228@subsection General information
@@ -570,6 +547,44 @@ guix-packages-by-license} would do (@pxref{Emacs Commands}).
570@end table 547@end table
571 548
572 549
550@node Emacs Package Locations
551@section Package Source Locations
552
553As you know, package definitions are placed in Guile files, also known
554as @dfn{package locations}. The following commands should help you not
555get lost in these locations:
556
557@table @kbd
558
559@item M-x guix-find-location
560Open the given package definition source file (press @key{TAB} to choose
561a location from a completion list).
562
563@item M-x guix-edit
564Find location of a specified package. This is an Emacs analog of
565@command{guix edit} command (@pxref{Invoking guix edit}). As with
566@kbd{M-x guix-packages-by-name}, you can press @key{TAB} to complete a
567package name.
568
569@end table
570
571If you are contributing to Guix, you may find it useful for @kbd{M-x
572guix-find-location} and @kbd{M-x guix-edit} to open locations from your
573Git checkout. This can be done by setting @code{guix-directory}
574variable. For example, after this:
575
576@example
577(setq guix-directory "~/src/guix")
578@end example
579
580@kbd{M-x guix-edit guix} opens
581@file{~/src/guix/gnu/packages/package-management.scm} file.
582
583Also you can use @kbd{C-u} prefix argument to specify a directory just
584for the current @kbd{M-x guix-find-location} or @kbd{M-x guix-edit}
585command.
586
587
573@node Emacs Popup Interface 588@node Emacs Popup Interface
574@section Popup Interface 589@section Popup Interface
575 590
diff --git a/doc/guix.texi b/doc/guix.texi
index 1b02ba0373f..4d694c500c6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -118,6 +118,7 @@ Emacs Interface
118* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}. 118* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}.
119* Package Management: Emacs Package Management. Managing packages and generations. 119* Package Management: Emacs Package Management. Managing packages and generations.
120* Licenses: Emacs Licenses. Interface for licenses of Guix packages. 120* Licenses: Emacs Licenses. Interface for licenses of Guix packages.
121* Package Source Locations: Emacs Package Locations. Interface for package location files.
121* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. 122* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands.
122* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. 123* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names.
123* Build Log Mode: Emacs Build Log. Highlighting Guix build logs. 124* Build Log Mode: Emacs Build Log. Highlighting Guix build logs.