diff options
author | Alex Kost <alezost@gmail.com> | 2015-06-19 21:57:04 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-06-22 22:19:19 +0300 |
commit | 6248e3263523c81ec1427f41d56faac3384a35d4 (patch) | |
tree | ed729eb52e362a406d7e142dad145e5e399b7037 /emacs/guix-base.el | |
parent | 6a8c9545cb9702236586d905b9ebbf2790fcdf91 (diff) | |
download | guix-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-base.el')
-rw-r--r-- | emacs/guix-base.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 851ee895b9..587288eaf9 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -172,6 +172,14 @@ If PATH is relative, it is considered to be relative to (move-to-column col) (recenter 1)))) +(defun guix-edit-package (id) + "Edit (go to location of) package with ID." + (let ((loc (guix-eval-read (guix-make-guile-expression + 'package-location-string id)))) + (if loc + (guix-find-location loc) + (message "Couldn't find package location.")))) + ;;; Buffers and auto updating. |