Alex Kost <alez...@gmail.com> skribis: > Ludovic Courtès (2014-09-07 01:11 +0400) wrote: > >> Taylan Ulrich Bayirli/Kammer <taylanbayi...@gmail.com> skribis: >> >>> By the way, it might be nice to have an option to list the secondary >>> outputs of a package explicitly alongside the normal, as if it were just >>> another package. >> >> Currently *Guix Package List* shows, for instance: >> >> gcc-toolchain 4.9.1 out, debug debug, out Complete GCC >> tool chain for C/C++ development >> >> Are you suggesting that it should instead show it as two lines? >> >> gcc-toolchain 4.9.1 out yes Complete GCC tool chain for >> C/C++ development >> gcc-toolchain 4.9.1 debug yes Complete GCC tool chain for >> C/C++ development >> >> I think I would prefer it. (One advantage is that it would allow users >> to mark just one specific output, which is not currently possible.)
[...] > As for the changes visible to a user: now it is possible to get a list > of outputs with “(setq guix-package-list-type 'output)”. Should it be > default? The list of outputs means there’s one line for each output, as in the example above, right? I would make it the default, yes. > Another UI question: RET in “*Guix Package List*” buffer describes > current package(s) in “*Guix Package Info*” buffer. Analogously, RET in > “*Guix Output List*” buffer describes current output(s) in “*Guix Output > Info*” buffer. However I think it's not very useful: “output-info” > buffer is very similar to “package-info” but it contains only one output > per package info. So I think it would be better to display a usual > “package-info” buffer (with all available outputs for a package) when a > user press RET in a list of outputs. [not a clear description, isn't it :-)] > WDYT? I would prefer having just *Guix Package List* and *Guix Package Info* (each listing all the outputs of packages), and not *Guix Output List* and *Guix Output Info*. Would it be possible? > From 8154b7193e3dac02447d5f7096b92fb4b9d65ed0 Mon Sep 17 00:00:00 2001 > From: Alex Kost <alez...@gmail.com> > Date: Wed, 17 Sep 2014 17:52:08 +0400 > Subject: [PATCH 1/3] emacs: Use general functions instead of generated ones. > > * emacs/guix-base.el: Add and use general functions instead of > specialized functions generated by 'guix-define-buffer-type' macro. > (guix-buffer-type, guix-entry-type): New variables. > (guix-set-vars): Add new variables. > (guix-get-show-entries, guix-show-entries, guix-set-buffer) > (guix-history-call, guix-make-history-item) > (guix-get-params-for-receiving, guix-revert-buffer) > (guix-redisplay-buffer): New functions. > (guix-define-buffer-type): Do not generate specialized functions. > * emacs/guix-info.el (guix-package-info-insert-full-names): Use > 'guix-get-show-entries'. > (guix-generation-info-insert-number): Likewise. > * emacs/guix-list.el (guix-list-describe): New function. > (guix-list-define-entry-type): Do not generate specialized one. > (guix-generation-list-show-packages): Use 'guix-get-show-entries'. > * emacs/guix.el (guix-show-generations-function): Remove. > (guix-get-show-packages): Use new functions. > (guix-get-show-generations): Likewise. I trust you here. :-) > From d3fbccfd8a86d6b96f77f8993e88df8fe755e15f Mon Sep 17 00:00:00 2001 > From: Alex Kost <alez...@gmail.com> > Date: Fri, 19 Sep 2014 09:57:36 +0400 > Subject: [PATCH 3/3] emacs: Add support for displaying outputs. > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > Suggested by Taylan Ulrich Bayirli/Kammer and Ludovic Courtès. > > * emacs/guix-base.el (guix-param-titles): Add output titles. > (guix-messages): Add output messages. > (guix-get-package-id-and-output-by-output-id): New procedure. > * emacs/guix-info.el: Add "output-info" buffer type. > (guix-info-insert-methods): Add output methods. > (guix-info-displayed-params): Add output params. > (guix-output-info-insert-version, guix-output-info-insert-output): New > procedures. > * emacs/guix-list.el: Add "output-list" buffer type. > (guix-list-column-format): Add output formats. > (guix-list-column-value-methods): Add output methods. > (guix-package-list-type): New variable. > (guix-generation-list-show-packages): Use it. > (guix-package-list-marking-check): Use 'guix-output-list-mode'. > (guix-list-mark-package-upgrades): New procedure. > (guix-package-list-mark-upgrades): Use it. > (guix-list-execute-package-actions): New procedure. > (guix-package-list-execute): Use it. > (guix-output-list-mark-install, guix-output-list-mark-delete, > guix-output-list-mark-upgrade, guix-output-list-mark-upgrades, > guix-output-list-execute, guix-output-list-make-action): New procedures. > * emacs/guix.el (guix-get-show-packages): Use 'guix-package-list-type'. > * doc/emacs.texi (emacs Commands): Mention 'guix-package-list-type'. > (emacs List buffer): Describe "output-list". > (emacs Info buffer): Describe "output-info". > (emacs Buffer Names): New node. > (emacs Keymaps): Add keymaps for output buffers. OK! > diff --git a/doc/emacs.texi b/doc/emacs.texi > index 7616c8f..328b1f3 100644 > --- a/doc/emacs.texi > +++ b/doc/emacs.texi > @@ -104,6 +104,14 @@ many last generations. > > @end table > > +By default commands for displaying packages display a list with a > +package per line. If you prefer to see a list of outputs (i.e.@: a list > +with each output on a separate line), use the following setting: > + > +@example > +(setq guix-package-list-type 'output) > +@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} > @@ -191,6 +199,24 @@ Mark all obsolete packages for upgrading. > Execute actions on marked packages. > @end table > > +An ``output-list'' buffer additionally provides the following bindings: > + > +@table @kbd > +@item @key{RET} > +Describe marked outputs (display available information in a > +``output-info'' buffer). > +@item i > +Mark the current output for installation. > +@item d > +Mark the current output for deletion. > +@item U > +Mark the current output for upgrading. > +@item ^ > +Mark all obsolete outputs for upgrading. > +@item x > +Execute actions on marked outputs. > +@end table > + > A ``generation-list'' buffer additionally provides the following > bindings: > > @@ -213,7 +239,7 @@ The interface of an ``info'' buffer is similar to the > interface of > emacs, The Emacs Editor}) which can be used to: > > @itemize @bullet > -@item (in a ``package-info'' buffer) > +@item (in a ``package-info'' or ``output-info'' buffer) I think this convinced me that it’s better to just have the ‘package-info’ and the ‘package-list’ buffer do the right thing. The added complexity above may be intimidating to users. Thanks, Ludo’.