diff options
author | Alex Kost <alezost@gmail.com> | 2015-08-17 12:05:05 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-08-30 18:26:03 +0300 |
commit | eb097f36b1c3e7a25f1ce212670e8a19788fd195 (patch) | |
tree | 350e58f4d0bd133c2c1c47487c06ec7b49b7c358 /emacs/guix-base.el | |
parent | 9b0afb0d289c58233bbc1764097b88e7fab3724f (diff) | |
download | patches-eb097f36b1c3e7a25f1ce212670e8a19788fd195.tar patches-eb097f36b1c3e7a25f1ce212670e8a19788fd195.tar.gz |
emacs: Use prompt for packages instead popup for edit action.
* emacs/guix-base.el (guix-package-location): New function.
(guix-edit-package): Rename and move to ...
* emacs/guix.el (guix-edit): ...here. Make it interactive.
* emacs/guix-command.el (guix-edit-action): New function (alias to
'guix-edit') to override the popup for edit command in "M-x guix".
* emacs/guix-list.el (guix-list-edit-package): Adjust for 'guix-edit'
renaming.
* emacs/guix-main.scm (package-location-string): Allow to accept package
id or package name as argument.
Diffstat (limited to 'emacs/guix-base.el')
-rw-r--r-- | emacs/guix-base.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 4dff0d6170..3bee910b05 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -172,13 +172,11 @@ 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.")))) +(defun guix-package-location (id-or-name) + "Return location of a package with ID-OR-NAME. +For the meaning of location, see `guix-find-location'." + (guix-eval-read (guix-make-guile-expression + 'package-location-string id-or-name))) ;;; Receivable lists of packages, lint checkers, etc. |