guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "M-x guix" - magit-like interface for guix commands


From: Ludovic Courtès
Subject: Re: "M-x guix" - magit-like interface for guix commands
Date: Sat, 29 Aug 2015 18:01:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alex Kost <address@hidden> skribis:

> Ludovic Courtès (2015-08-28 12:37 +0300) wrote:

[...]

>> Of course, you’re effectively the maintainer of that part.
>
> OK, but I also made some changes outside "emacs" dir:

Right, thanks for the heads-up then.  ;-)

> - I exported stuff from (guix scripts lint) and (guix scripts graph):
>   so that when a user choose "--checkers" option for 'guix lint' or

Regarding:

  Author:     Alex Kost <address@hidden>
  AuthorDate: Wed Aug 12 14:17:44 2015 +0300
  Commit:     Alex Kost <address@hidden>
  CommitDate: Fri Aug 28 23:03:58 2015 +0300

      guix lint: Export checkers and <lint-checker> accessors.

      * guix/scripts/lint.scm (%checkers, make-lint-checker, lint-checker,
        lint-checker?, lint-checker-name, lint-checker-description,
        lint-checker-check): Export.

This is fine, but please don’t export ‘make-lint-checker’ (people should
use the nicer ‘lint-checker’ macro instead.)

> - I moved emacs info node from "Package Management" to "Top" because it
>   is not just about package management anymore (as there are
>   "guix-prettify" and shell completions, and now there is also popup
>   interface for all guix commands).

Regarding:

  Author:     Alex Kost <address@hidden>
  AuthorDate: Thu Aug 13 20:16:29 2015 +0300
  Commit:     Alex Kost <address@hidden>
  CommitDate: Fri Aug 28 23:03:59 2015 +0300

      doc: Reorganize "Emacs Interface" node.

      * doc/guix.texi (Package Management): Move "Emacs Interface" node to ...
        (Top): ...here, since it is not just about package management.
      * doc/emacs.texi: Shift all nodes one level up (@section -> @chapter, 
etc.).
        Rename "Emacs Usage" node into "Emacs Package Management".  Move "Emacs
        Configuration" node here.

It sounds good to me.  Perhaps add something like this in this commit:

--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -972,9 +972,9 @@ features.
 
 This chapter describes the main features of Guix, as well as the package
 management tools it provides.  Two user interfaces are provided for
-routine package management tasks: a command-line interface
-(@pxref{Invoking guix package, @code{guix package}}), and a visual user
-interface in Emacs (@pxref{Emacs Interface}).
+routine package management tasks: A command-line interface described below
+(@pxref{Invoking guix package, @code{guix package}}), as well as a visual user
+interface in Emacs described in a subsequent chapter (@pxref{Emacs Interface}).
 
 @menu
 * Features::                    How Guix will make your life brighter.
> - And finally I moved a part of code from 'guix-main' to a new
>   'run-guix' procedure (in (guix ui) module).

Regarding:

  Author:     Alex Kost <address@hidden>
  AuthorDate: Sun Aug 16 10:28:04 2015 +0300
  Commit:     Alex Kost <address@hidden>
  CommitDate: Fri Aug 28 23:03:59 2015 +0300

      ui: Add 'run-guix'.

      * guix/ui.scm (guix-main): Move the code to run guix command line to ...
        (run-guix): ...here.  New procedure.  Export it.


[...]

  +(define (run-guix . args)
  +  "Run guix command defined by command line ARGS."

Missing “the” (“Run the 'guix' command”.)  Also please add something
like, “Unlike ‘guix-main’, this procedure assumes that locale, i18n
support, and signal handling has already been set up.”

> As for the emacs part: many long options don't have short analogs, so I
> chose keys (for popup windows) that seem appropriate for me, but they
> may not be good defaults for others.  The same thing with guix commands.
> For example, I chose "p" for "package", "P" for "pull" and "u" for
> "publish"; or "s" for "system" and "z" for "size", etc.  But maybe it is
> OK for now, and may be fixed later, if people will complain about
> strange popup keys, WDYT?

At first sight that looks good to me, because it uses the first letter
of the most common commands (‘package’ vs. ‘pull’, ‘system’ vs. ‘size’,
etc.)  But we can always adjust them later if needed.

> Also perhaps there are too many auxiliary commits (add this, add that),
> not sure if it's acceptable.

That’s OK.

Besides, this commit:

  References: wip-emacs-popup-ui origin/wip-emacs-popup-ui
  Author:     Alex Kost <address@hidden>
  AuthorDate: Tue Aug 18 11:32:42 2015 +0300
  Commit:     Alex Kost <address@hidden>
  CommitDate: Fri Aug 28 23:04:00 2015 +0300

      emacs: Use popup interface instead 'guix-pull' command.

      * emacs/guix-base.el (guix-pull): Remove.
      * doc/emacs.texi (Emacs Commands): Adjust accordingly.
      * emacs/guix-main.scm: Do not use (guix scripts pull) module.

removes M-x guix-pull.  But that means that people who don’t have
magit-popup no longer have a way to run that command, which I’d like to
avoid.

Is it possible to keep it?

> Yes, I think so.  I have rebased "wip-emacs-popup-ui" branch on master
> and made some final tweaks.  So this is the last warning! :-) If you
> still don't have comments/notes, I'm ready to push these commits.

Well thanks for insisting, now you have a bunch of actions to take.  ;-)

Cheers,
Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]