diff options
author | Alex Kost <alezost@gmail.com> | 2016-02-07 11:08:57 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2016-02-10 01:31:19 +0300 |
commit | 2c04e2eec8bf250d1e928b7c8b1e60424b0b32fa (patch) | |
tree | 03e58fc32ef89d25196a3c705163a811460e1ab4 /emacs/guix-ui-package.el | |
parent | f1957fc145dc531b977b702d2947d84d9122042c (diff) | |
download | patches-2c04e2eec8bf250d1e928b7c8b1e60424b0b32fa.tar patches-2c04e2eec8bf250d1e928b7c8b1e60424b0b32fa.tar.gz |
emacs: 'C-u M-x guix-edit' prompts for directory.
* emacs/guix-base.el (guix-read-directory): New procedure.
(guix-find-location, guix-edit): Add optional 'directory' argument.
* emacs/guix-ui-package.el (guix-package-list-edit)
(guix-output-list-edit): Likewise.
* doc/emacs.texi (Emacs Commands): Mention "C-u".
Diffstat (limited to 'emacs/guix-ui-package.el')
-rw-r--r-- | emacs/guix-ui-package.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el index 0971fdd438..ff10a1e75c 100644 --- a/emacs/guix-ui-package.el +++ b/emacs/guix-ui-package.el @@ -746,10 +746,11 @@ The specification is suitable for `guix-process-package-actions'." (let ((specs (guix-list-get-marked-args action-type))) (and specs (cons action-type specs)))) -(defun guix-package-list-edit () - "Go to the location of the current package." - (interactive) - (guix-edit (guix-list-current-id))) +(defun guix-package-list-edit (&optional directory) + "Go to the location of the current package. +See `guix-find-location' for the meaning of DIRECTORY." + (interactive (list (guix-read-directory))) + (guix-edit (guix-list-current-id) directory)) (defun guix-package-list-latest-builds (number &rest args) "Display latest NUMBER of Hydra builds of the current package. @@ -906,11 +907,13 @@ See `guix-package-info-type'." 'id (cl-remove-duplicates pids)) 'add)))) -(defun guix-output-list-edit () - "Go to the location of the current package." - (interactive) +(defun guix-output-list-edit (&optional directory) + "Go to the location of the current package. +See `guix-find-location' for the meaning of DIRECTORY." + (interactive (list (guix-read-directory))) (guix-edit (guix-entry-value (guix-list-current-entry) - 'package-id))) + 'package-id) + directory)) ;;; Interactive commands |