summaryrefslogtreecommitdiff
path: root/emacs/guix-read.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guix-read.el')
-rw-r--r--emacs/guix-read.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/guix-read.el b/emacs/guix-read.el
index a1a6b86364..5423c9bcfa 100644
--- a/emacs/guix-read.el
+++ b/emacs/guix-read.el
@@ -62,6 +62,12 @@
"Return a list of names of available licenses."
(guix-eval-read (guix-make-guile-expression 'license-names)))
+(guix-memoized-defun guix-package-locations ()
+ "Return a list of available package locations."
+ (sort (guix-eval-read (guix-make-guile-expression
+ 'package-location-files))
+ #'string<))
+
;;; Readers
@@ -131,6 +137,11 @@
:single-reader guix-read-license-name
:single-prompt "License: ")
+(guix-define-readers
+ :completions-getter guix-package-locations
+ :single-reader guix-read-package-location
+ :single-prompt "Location: ")
+
(provide 'guix-read)
;;; guix-read.el ends here