From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix.el & multiple outputs Date: Sun, 21 Sep 2014 21:37:48 +0200 Message-ID: <87fvfkwyr7.fsf@gnu.org> References: <87a96e7bu3.fsf@gmail.com> <87egvq1nj2.fsf@gnu.org> <87y4ty5jl9.fsf@gmail.com> <8738c5vmuv.fsf@gnu.org> <87lhpw66kq.fsf@gmail.com> <87y4twek0u.fsf@taylan.uni.cx> <87bnqssbc0.fsf_-_@gnu.org> <87sijodrl2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVmxP-0001jG-FZ for guix-devel@gnu.org; Sun, 21 Sep 2014 15:38:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVmxG-00075H-C1 for guix-devel@gnu.org; Sun, 21 Sep 2014 15:38:03 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:52698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVmxG-000751-0d for guix-devel@gnu.org; Sun, 21 Sep 2014 15:37:54 -0400 In-Reply-To: <87sijodrl2.fsf@gmail.com> (Alex Kost's message of "Fri, 19 Sep 2014 10:58:33 +0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > Ludovic Court=C3=A8s (2014-09-07 01:11 +0400) wrote: > >> Taylan Ulrich Bayirli/Kammer 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 G= CC 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 =E2=80=9C(setq guix-package-list-type 'output)=E2=80=9D. = Should it be > default? The list of outputs means there=E2=80=99s one line for each output, as in t= he example above, right? I would make it the default, yes. > Another UI question: RET in =E2=80=9C*Guix Package List*=E2=80=9D buffer = describes > current package(s) in =E2=80=9C*Guix Package Info*=E2=80=9D buffer. Anal= ogously, RET in > =E2=80=9C*Guix Output List*=E2=80=9D buffer describes current output(s) i= n =E2=80=9C*Guix Output > Info*=E2=80=9D buffer. However I think it's not very useful: =E2=80=9Cou= tput-info=E2=80=9D > buffer is very similar to =E2=80=9Cpackage-info=E2=80=9D but it contains = only one output > per package info. So I think it would be better to display a usual > =E2=80=9Cpackage-info=E2=80=9D buffer (with all available outputs for a p= ackage) 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 > Date: Wed, 17 Sep 2014 17:52:08 +0400 > Subject: [PATCH 1/3] emacs: Use general functions instead of generated on= es. > > * 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 > 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=3DUTF-8 > Content-Transfer-Encoding: 8bit > > Suggested by Taylan Ulrich Bayirli/Kammer and Ludovic Court=C3=A8s. > > * 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. >=20=20 > @end table >=20=20 > +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 >=20=20 > +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: >=20=20 > @@ -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: >=20=20 > @itemize @bullet > -@item (in a ``package-info'' buffer) > +@item (in a ``package-info'' or ``output-info'' buffer) I think this convinced me that it=E2=80=99s better to just have the =E2=80=98package-info=E2=80=99 and the =E2=80=98package-list=E2=80=99 buffe= r do the right thing. The added complexity above may be intimidating to users. Thanks, Ludo=E2=80=99.