diff options
author | Alex Kost <alezost@gmail.com> | 2014-10-17 22:21:32 +0400 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-10-18 10:24:13 +0400 |
commit | 23459fa59b3e96baa07da1ae4c78af70c255ac20 (patch) | |
tree | 9251bba1b7781a68ff2e6c69253781923cbd08ae /doc | |
parent | 7c3c0374de446af387c8478f77083fd0e357253c (diff) | |
download | guix-23459fa59b3e96baa07da1ae4c78af70c255ac20.tar guix-23459fa59b3e96baa07da1ae4c78af70c255ac20.tar.gz |
emacs: Improve interface for working with multiple profiles.
Suggested by David Thompson, Ludovic Courtès and Mathieu Lirzin.
* emacs/guix-base.el (guix-profile-prompt): New procedure.
(guix-set-current-profile): Use it.
(guix-buffer-name-simple, guix-buffer-name-default, guix-buffer-name): New
procedures.
(guix-buffer-name-function, guix-profile): New variables.
(guix-set-vars, guix-get-entries, guix-get-show-entries, guix-set-buffer,
guix-history-call, guix-process-package-actions,
guix-continue-package-operation-p, guix-delete-generations,
guix-switch-to-generation): Add 'profile' argument.
* emacs/guix.el (guix-get-show-packages, guix-get-show-generations,
guix-search-by-name, guix-search-by-regexp, guix-installed-packages,
guix-obsolete-packages, guix-all-available-packages,
guix-newest-available-packages, guix-generations, guix-generations-by-time):
Likewise.
(guix-last-generations): New command.
* emacs/guix-info.el: Adjust for using 'profile' argument where needed.
* emacs/guix-list.el: Likewise.
* doc/emacs.texi (Emacs Commands): Document 'guix-last-generations' and using
"C-u" for commands.
(Emacs Buffer Names): Document 'guix-buffer-name-function'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs.texi | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi index a1d88c68b7..4c3833ad0b 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi @@ -76,19 +76,26 @@ can be displayed in a ``list'' or ``info'' buffer. @node Emacs Commands @subsubsection Commands -You may use the following commands to display packages and generations: +All commands for displaying packages and generations use the current +profile, which can be changed with +@kbd{M-x@tie{}guix-set-current-profile}. Alternatively, if you call any +of these commands with prefix argument (@kbd{C-u}), you will be prompted +for a profile just for that command. + +Commands for displaying packages: @table @kbd + @item M-x guix-all-available-packages @itemx M-x guix-newest-available-packages Display all/newest available packages. @item M-x guix-installed-packages -Display all packages installed in the current profile. +Display all installed packages. @item M-x guix-obsolete-packages -Display obsolete packages (the packages that are installed in the -current profile but cannot be found among available packages). +Display obsolete packages (the packages that are installed in a profile +but cannot be found among available packages). @item M-x guix-search-by-name Display package(s) with the specified name. @@ -98,29 +105,33 @@ Search for packages by a specified regexp. By default ``name'', ``synopsis'' and ``description'' of the packages will be searched. This can be changed by modifying @code{guix-search-params} variable. -@item M-x guix-generations -List generations for the current profile. With numeric prefix, show so -many last generations. - -@item M-x guix-generations-by-time -List generations matching time period. You'll be prompted for the -period using Org mode time prompt based on Emacs calendar (@pxref{The -date/time prompt,,, org, Org Mode Manual}). - @end table -By default commands for displaying packages display each output on a -separate line. If you prefer to see a list of packages---i.e., a list -with a package per line, use the following setting: +By default, these commands display each output on a separate line. If +you prefer to see a list of packages---i.e., a list with a package per +line, use the following setting: @example (setq guix-package-list-type 'package) @end example -It is possible to change the currently used profile with -@kbd{M-x@tie{}guix-set-current-profile}. This has the same effect as -specifying @code{--profile} option for @command{guix package} -(@pxref{Invoking guix package}). +Commands for displaying generations: + +@table @kbd + +@item M-x guix-generations +List all the generations. + +@item M-x guix-last-generations +List the @var{N} last generations. You will be prompted for the number +of generations. + +@item M-x guix-generations-by-time +List generations matching time period. You will be prompted for the +period using Org mode time prompt based on Emacs calendar (@pxref{The +date/time prompt,,, org, Org Mode Manual}). + +@end table @node Emacs General info @subsubsection General information @@ -304,10 +315,13 @@ changed with the following variables: @item guix-generation-info-buffer-name @item guix-repl-buffer-name @item guix-internal-repl-buffer-name -@item guix-temp-buffer-name @end table -For example if you want to display all types of results in a single +By default, the name of a profile is also displayed in a ``list'' or +``info'' buffer name. To change this behavior, use +@code{guix-buffer-name-function} variable. + +For example, if you want to display all types of results in a single buffer (in such case you will probably use a history (@kbd{l}/@kbd{r}) extensively), you may do it like this: @@ -319,7 +333,8 @@ extensively), you may do it like this: guix-generation-list-buffer-name name guix-package-info-buffer-name name guix-output-info-buffer-name name - guix-generation-info-buffer-name name)) + guix-generation-info-buffer-name name + guix-buffer-name-function #'guix-buffer-name-simple)) @end example @node Emacs Keymaps |