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.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'emacs/guix.el') diff --git a/emacs/guix.el b/emacs/guix.el index afe7285696..244696a184 100644 --- a/emacs/guix.el +++ b/emacs/guix.el @@ -1,6 +1,6 @@ ;;; guix.el --- Interface for GNU Guix package manager -;; Copyright © 2014 Alex Kost +;; Copyright © 2014, 2015 Alex Kost ;; Package-Requires: ((geiser "0.3")) ;; Keywords: tools @@ -32,6 +32,7 @@ (require 'guix-list) (require 'guix-info) (require 'guix-utils) +(require 'guix-read) (defgroup guix nil "Interface for Guix package manager." @@ -193,6 +194,15 @@ Interactively with prefix, prompt for PROFILE." (float-time from) (float-time to))) +;;;###autoload +(defun guix-edit (id-or-name) + "Edit (go to location of) package with ID-OR-NAME." + (interactive (list (guix-read-package-name))) + (let ((loc (guix-package-location id-or-name))) + (if loc + (guix-find-location loc) + (message "Couldn't find package location.")))) + (provide 'guix) ;;; guix.el ends here -- cgit v1.2.3