all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Alex Kost <alezost@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: guix.el & multiple outputs
Date: Sun, 21 Sep 2014 21:37:48 +0200	[thread overview]
Message-ID: <87fvfkwyr7.fsf@gnu.org> (raw)
In-Reply-To: <87sijodrl2.fsf@gmail.com> (Alex Kost's message of "Fri, 19 Sep 2014 10:58:33 +0400")

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2014-09-07 01:11 +0400) wrote:
>
>> Taylan Ulrich Bayirli/Kammer <taylanbayirli@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 <alezost@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 <alezost@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’.

  parent reply	other threads:[~2014-09-21 19:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05  7:42 guix.el: Key bindings for a "package list" Alex Kost
2014-09-05  8:26 ` Ludovic Courtès
2014-09-05 12:37   ` Alex Kost
2014-09-05 20:22     ` Ludovic Courtès
2014-09-06 16:45       ` Alex Kost
2014-09-06 17:28         ` Taylan Ulrich Bayirli/Kammer
2014-09-06 21:11           ` guix.el & multiple outputs Ludovic Courtès
2014-09-06 22:39             ` Taylan Ulrich Bayirli/Kammer
2014-09-08  6:50               ` Ludovic Courtès
2014-09-07 16:14             ` Alex Kost
2014-09-19  6:58             ` Alex Kost
2014-09-20 14:11               ` [PATCH] emacs: Rewrite scheme side in a functional manner Ludovic Courtès
2014-09-21 10:51                 ` Alex Kost
2014-09-21 19:27                   ` Ludovic Courtès
2014-09-23 20:14                     ` Alex Kost
2014-09-24  7:48                       ` Ludovic Courtès
2014-09-21 19:28                   ` ‘profile-generations’ Ludovic Courtès
2014-09-21 19:37               ` Ludovic Courtès [this message]
2014-09-23 20:14                 ` guix.el & multiple outputs Alex Kost
2014-09-24  7:50                   ` Ludovic Courtès
2014-09-06 21:15         ` guix.el: Key bindings for a "package list" Ludovic Courtès
2014-09-07 16:14           ` Alex Kost
2014-09-08  6:51             ` Ludovic Courtès
2014-09-05  9:11 ` Taylan Ulrich Bayirli/Kammer
2014-09-05 12:37   ` Alex Kost
2014-09-05 20:24     ` Ludovic Courtès
2014-09-06  8:17       ` Alex Kost
2014-09-06 10:55         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvfkwyr7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.