From eb097f36b1c3e7a25f1ce212670e8a19788fd195 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Mon, 17 Aug 2015 12:05:05 +0300 Subject: 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. --- emacs/guix-base.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'emacs/guix-base.el') 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. -- cgit v1.2.3