From 83aab70b2d4d11fa345c1fbf2ccdbec8b7ad6662 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 20 Jan 2016 18:53:19 +0300 Subject: emacs: Add 'guix-packages-by-license' command. * emacs/guix-main.scm (packages-by-license): New procedure. (%patterns-makers): Add 'license' search type. * emacs/guix-messages.el (guix-message-packages-by-license): New procedure. (guix-messages): Use it. * emacs/guix-ui-package.el (guix-packages-by-license): New command. * doc/emacs.texi (Emacs Commands): Document it. --- emacs/guix-ui-package.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'emacs/guix-ui-package.el') diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el index 655ed74472..414bc9b9d2 100644 --- a/emacs/guix-ui-package.el +++ b/emacs/guix-ui-package.el @@ -35,6 +35,7 @@ (require 'guix-entry) (require 'guix-utils) (require 'guix-hydra-build) +(require 'guix-read) (require 'guix-license) (guix-ui-define-entry-type package) @@ -932,6 +933,17 @@ Interactively with prefix, prompt for PROFILE." (guix-ui-read-profile))) (guix-package-get-display profile 'name name)) +;;;###autoload +(defun guix-packages-by-license (license &optional profile) + "Display Guix packages with LICENSE. +LICENSE is a license name string. +If PROFILE is nil, use `guix-current-profile'. +Interactively with prefix, prompt for PROFILE." + (interactive + (list (guix-read-license-name) + (guix-ui-read-profile))) + (guix-package-get-display profile 'license license)) + ;;;###autoload (defun guix-search-by-regexp (regexp &optional params profile) "Search for Guix packages by REGEXP. -- cgit v1.2.3