diff options
author | Alex Kost <alezost@gmail.com> | 2014-11-04 19:38:27 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-11-07 14:58:15 +0300 |
commit | 9a130e19fcb46a15bf6ab5ceea08a9ec092bbb34 (patch) | |
tree | 94d6c6ec2a22d23d9d5933190d3bf6a5b6a04a4b /doc/emacs.texi | |
parent | d2e59637e37c00b9a9b6273693a68acf6dcc9493 (diff) | |
download | patches-9a130e19fcb46a15bf6ab5ceea08a9ec092bbb34.tar patches-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/emacs.texi')
-rw-r--r-- | doc/emacs.texi | 42 |
1 files changed, 42 insertions, 0 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 |