summary refs log tree commit diff
path: root/emacs/guix-list.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-06-19 21:57:04 +0300
committerAlex Kost <alezost@gmail.com>2015-06-22 22:19:19 +0300
commit6248e3263523c81ec1427f41d56faac3384a35d4 (patch)
treeed729eb52e362a406d7e142dad145e5e399b7037 /emacs/guix-list.el
parent6a8c9545cb9702236586d905b9ebbf2790fcdf91 (diff)
downloadguix-6248e3263523c81ec1427f41d56faac3384a35d4.tar.gz
emacs: Add "edit" command to a list of packages.
* emacs/guix-base.el (guix-edit-package): New function.
* emacs/guix-list.el (guix-list-edit-package): New command.  Bind it to
  "e" key.
* emacs/guix-main.scm (package-location-string): New procedure.
* doc/emacs.texi (Emacs List buffer): Document "e" key binding.
* doc/guix.texi (Invoking guix edit): Mention "package list" buffer.
Diffstat (limited to 'emacs/guix-list.el')
-rw-r--r--emacs/guix-list.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/guix-list.el b/emacs/guix-list.el
index 130b240c1e..26dfeacb8c 100644
--- a/emacs/guix-list.el
+++ b/emacs/guix-list.el
@@ -467,6 +467,11 @@ With prefix (if ARG is non-nil), describe entries marked with any mark."
                  (list (guix-list-current-id)))))
     (guix-list-describe-maybe guix-entry-type ids)))
 
+(defun guix-list-edit-package ()
+  "Go to the location of the current package."
+  (interactive)
+  (guix-edit-package (guix-list-current-package-id)))
+
 
 ;;; Displaying packages
 
@@ -505,6 +510,7 @@ likely)."
   :group 'guix-package-list)
 
 (let ((map guix-package-list-mode-map))
+  (define-key map (kbd "e")   'guix-list-edit-package)
   (define-key map (kbd "x")   'guix-package-list-execute)
   (define-key map (kbd "i")   'guix-package-list-mark-install)
   (define-key map (kbd "d")   'guix-package-list-mark-delete)
@@ -662,6 +668,7 @@ The specification is suitable for `guix-process-package-actions'."
 
 (let ((map guix-output-list-mode-map))
   (define-key map (kbd "RET") 'guix-output-list-describe)
+  (define-key map (kbd "e")   'guix-list-edit-package)
   (define-key map (kbd "x")   'guix-output-list-execute)
   (define-key map (kbd "i")   'guix-output-list-mark-install)
   (define-key map (kbd "d")   'guix-output-list-mark-delete)