aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-main.scm
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r--emacs/guix-main.scm7
1 files changed, 4 insertions, 3 deletions
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)))