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-main.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'emacs/guix-main.scm') diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index bd42f8fc21..fe224fb582 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -889,9 +889,10 @@ GENERATIONS is a list of generation numbers." (with-store store (delete-generations store profile generations))) -(define (package-location-string package-id) - "Return a location string of a package PACKAGE-ID." - (and-let* ((package (package-by-id package-id)) +(define (package-location-string id-or-name) + "Return a location string of a package with ID-OR-NAME." + (and-let* ((package (or (package-by-id id-or-name) + (first (packages-by-name id-or-name)))) (location (package-location package))) (location->string location))) -- cgit v1.2.3