From 6248e3263523c81ec1427f41d56faac3384a35d4 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Fri, 19 Jun 2015 21:57:04 +0300 Subject: 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. --- emacs/guix-main.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'emacs/guix-main.scm') diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index c6e4a8259b..e0dc683d88 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -887,6 +887,12 @@ (define (delete-generations* profile generations) (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)) + (location (package-location package))) + (location->string location))) + (define (package-source-derivation->store-path derivation) "Return a store path of the package source DERIVATION." (match (derivation-outputs derivation) -- cgit v1.2.3