aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-ui.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-12-18 11:34:48 +0300
committerAlex Kost <alezost@gmail.com>2016-01-02 17:25:35 +0300
commit494a62f215c9b6dc66737f6a46f4c538715a56ec (patch)
tree7d5b5b9a031549615a231d0a24aecbf1d2bfb440 /emacs/guix-ui.el
parent8ed2c92eb12b894e03cc634d92d3c78636f44020 (diff)
downloadgnu-guix-494a62f215c9b6dc66737f6a46f4c538715a56ec.tar
gnu-guix-494a62f215c9b6dc66737f6a46f4c538715a56ec.tar.gz
emacs: Add 'guix-ui-read-profile'.
* emacs/guix-ui.el (guix-ui-read-profile): New procedure. * emacs/guix-ui-package.el (guix-search-by-name) (guix-search-by-regexp, guix-installed-packages) (guix-obsolete-packages, guix-all-available-packages) (guix-newest-available-packages): Use it. * emacs/guix-ui-generation.el (guix-generations) (guix-last-generations, guix-generations-by-time): Use it.
Diffstat (limited to 'emacs/guix-ui.el')
-rw-r--r--emacs/guix-ui.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/guix-ui.el b/emacs/guix-ui.el
index 7b63e63378..7fef7c355c 100644
--- a/emacs/guix-ui.el
+++ b/emacs/guix-ui.el
@@ -47,6 +47,13 @@ generations in 'list' and 'info' buffers.")
(guix-buffer-define-current-args-accessors
"guix-ui-current" "profile" "search-type" "search-values")
+(defun guix-ui-read-profile ()
+ "Return `guix-current-profile' or prompt for it.
+This function is intended for using in `interactive' forms."
+ (if current-prefix-arg
+ (guix-profile-prompt)
+ guix-current-profile))
+
(defun guix-ui-get-entries (profile entry-type search-type search-values
&optional params)
"Receive ENTRY-TYPE entries for PROFILE.