summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-11-04 19:38:27 +0300
committerAlex Kost <alezost@gmail.com>2014-11-07 14:58:15 +0300
commit9a130e19fcb46a15bf6ab5ceea08a9ec092bbb34 (patch)
tree94d6c6ec2a22d23d9d5933190d3bf6a5b6a04a4b /doc
parentd2e59637e37c00b9a9b6273693a68acf6dcc9493 (diff)
downloadguix-9a130e19fcb46a15bf6ab5ceea08a9ec092bbb34.tar.gz
emacs: Add 'guix-prettify'.
* emacs/guix-prettify.el: New file.
* emacs.am (ELFILES): Add it.
* doc/emacs.texi (Emacs Prettify): New node.
* doc/guix.texi (Features): Mention it.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs.texi42
-rw-r--r--doc/guix.texi4
2 files changed, 45 insertions, 1 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 9e8fec4455..89e2570d01 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -18,6 +18,7 @@ guix package}).  Specifically, ``guix.el'' makes it easy to:
 * Initial Setup: Emacs Initial Setup.	Preparing @file{~/.emacs}.
 * Usage: Emacs Usage.			Using the interface.
 * Configuration: Emacs Configuration.	Configuring the interface.
+* Prettify Mode: Emacs Prettify.	Abbreviating @file{/gnu/store/@dots{}} file names.
 @end menu
 
 @node Emacs Initial Setup
@@ -422,3 +423,44 @@ buffers.
 Various settings for ``info'' buffers.
 
 @end table
+
+
+@node Emacs Prettify
+@subsection 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{}'':
+
+@example
+/gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1
+@result{} /gnu/store/…-foo-0.1
+@end example
+
+Once you set up ``guix.el'' (@pxref{Emacs Initial Setup}), the following
+commands become available:
+
+@table @kbd
+
+@item M-x guix-prettify-mode
+Enable/disable prettifying for the current buffer.
+
+@item M-x global-guix-prettify-mode
+Enable/disable prettifying globally.
+
+@end table
+
+To automatically enable @code{guix-prettify-mode} globally on Emacs
+start, add the following line to your init file:
+
+@example
+(global-guix-prettify-mode)
+@end example
+
+If you want to enable it only for specific major modes, add it to the
+mode hooks (@pxref{Hooks,,, emacs, The GNU Emacs Manual}), for example:
+
+@example
+(add-hook 'shell-mode-hook 'guix-prettify-mode)
+(add-hook 'dired-mode-hook 'guix-prettify-mode)
+@end example
diff --git a/doc/guix.texi b/doc/guix.texi
index d91f7a8fc8..a432d2eb19 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -628,7 +628,9 @@ management tools it provides.
 
 When using Guix, each package ends up in the @dfn{package store}, in its
 own directory---something that resembles
-@file{/gnu/store/xxx-package-1.2}, where @code{xxx} is a base32 string.
+@file{/gnu/store/xxx-package-1.2}, where @code{xxx} is a base32 string
+(note that Guix comes with an Emacs extension to shorten those file
+names, @ref{Emacs Prettify}.)
 
 Instead of referring to these directories, users have their own
 @dfn{profile}, which points to the packages that they actually want to