Ludovic Courtès (2015-10-20 02:09 +0300) wrote: > Hello! > > I’m happy to announce the new ‘guix challenge’ command! (Documentation > below.)
I like new commands! And this one is cool; I didn't think about timestamp non-determinism before, thanks! I'm attaching 2 trivial patches for emacs support of ‘guix challenge’. The first patch is for completing packages in "M-x shell". And the second one is for adding a positional "Packages" argument in "M-x guix RET challenge". These are 2 different things, so I made 2 patches, or should it be a single “emacs: Add support for 'guix challenge'” patch?
>From adaf6ab125d1bfd8e9416edd7d920e663c4c7785 Mon Sep 17 00:00:00 2001 From: Alex Kost <alez...@gmail.com> Date: Tue, 20 Oct 2015 16:42:01 +0300 Subject: [PATCH 1/2] emacs: Add shell completions for 'guix challenge'. * emacs/guix-pcomplete.el (guix-pcomplete-complete-command-arg): Add "challenge" to complete package names for it. --- emacs/guix-pcomplete.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/guix-pcomplete.el b/emacs/guix-pcomplete.el index 4743be5..bd41837 100644 --- a/emacs/guix-pcomplete.el +++ b/emacs/guix-pcomplete.el @@ -209,7 +209,7 @@ group - the argument.") "Complete argument for guix COMMAND." (cond ((member command - '("archive" "build" "graph" "edit" "environment" + '("archive" "build" "challenge" "graph" "edit" "environment" "lint" "refresh" "size")) (while t (pcomplete-here (guix-pcomplete-all-packages)))) -- 2.5.0
>From 41b2f36081f5c36b56156231a280e183dabd3243 Mon Sep 17 00:00:00 2001 From: Alex Kost <alez...@gmail.com> Date: Tue, 20 Oct 2015 16:43:49 +0300 Subject: [PATCH 2/2] emacs: Add "Packages" option for 'guix challenge' popup. * emacs/guix-command.el (guix-command-rest-argument): Add "challenge". --- emacs/guix-command.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/guix-command.el b/emacs/guix-command.el index 1a42594..e9e46f4 100644 --- a/emacs/guix-command.el +++ b/emacs/guix-command.el @@ -364,7 +364,7 @@ to be modified." :name "-- " :char ?= :option? t args))) (let ((command (car commands))) (cond - ((member command '("archive" "build" "graph" "edit" + ((member command '("archive" "build" "challenge" "graph" "edit" "environment" "lint" "refresh")) (argument :doc "Packages" :fun 'guix-read-package-names-string)) ((string= command "download") -- 2.5.0