aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-ui-package.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-04-01 00:07:33 +0300
committerAlex Kost <alezost@gmail.com>2016-04-18 10:09:01 +0300
commitb4ea535a9f0382f3575fdeb3b2eb1cc7cfc37cd4 (patch)
tree377f4156c3c6e51dcf9c2cbaa80124f83aafec02 /emacs/guix-ui-package.el
parent9bb46c155b463029f3da84d1b146efa79785a4ac (diff)
downloadguix-b4ea535a9f0382f3575fdeb3b2eb1cc7cfc37cd4.tar
guix-b4ea535a9f0382f3575fdeb3b2eb1cc7cfc37cd4.tar.gz
emacs: Add 'guix-packages-by-location' command.
* emacs/guix-main.scm (packages-by-location-file, package-location-files): New procedures. (%patterns-makers): Add 'location' search type. * emacs/guix-messages.el (guix-message-packages-by-location): New procedure. (guix-messages): Use it. * emacs/guix-read.el (guix-package-locations) (guix-read-package-location): New procedures. * emacs/guix-ui-package.el (guix-packages-by-location): New command. * doc/emacs.texi (Emacs Commands): Document it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'emacs/guix-ui-package.el')
-rw-r--r--emacs/guix-ui-package.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index df5f8d12d1..07bbd973e7 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -1,6 +1,6 @@
;;; guix-ui-package.el --- Interface for displaying packages -*- lexical-binding: t -*-
-;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
+;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -970,6 +970,16 @@ Interactively with prefix, prompt for PROFILE."
(guix-package-get-display profile 'license license))
;;;###autoload
+(defun guix-packages-by-location (location &optional profile)
+ "Display Guix packages placed in LOCATION file.
+If PROFILE is nil, use `guix-current-profile'.
+Interactively with prefix, prompt for PROFILE."
+ (interactive
+ (list (guix-read-package-location)
+ (guix-ui-read-profile)))
+ (guix-package-get-display profile 'location location))
+
+;;;###autoload
(defun guix-search-by-regexp (regexp &optional params profile)
"Search for Guix packages by REGEXP.
PARAMS are package parameters that should be searched.