Rename 'guix-search-…' to 'guix-packages-…' commands

* elisp/guix-ui-package.el (guix-search-by-regexp, guix-search-by-name):
Leave as obsolete aliases; rename to 'guix-packages-by-regexp' and
'guix-packages-by-name-regexp' respectively.
* elisp/guix-popup.el (guix-package-popup): Adjust accordingly.
* elisp/guix-help.el (guix-help-specifications): Likewise.
* doc/emacs-guix.texi (Package Commands): Likewise.
This commit is contained in:
Alex Kost 2021-02-24 19:01:02 +03:00 committed by Theo Tyburn
parent fb58cfdf40
commit 5b6fcaa47d
5 changed files with 55 additions and 46 deletions

View file

@ -9,7 +9,7 @@ This document describes Emacs-Guix, the Emacs interface for the
@uref{https://www.gnu.org/software/guix/, GNU Guix} package manager.
@quotation
Copyright @copyright{} 2014-2019 Alex Kost@*
Copyright @copyright{} 2014-2019, 2021 Alex Kost@*
Copyright @copyright{} 2018 Oleg Pykhalov
Permission is granted to copy, distribute and/or modify this document
@ -368,6 +368,19 @@ separated by commas) and a dependency type (it should be either
@item M-x guix-packages-by-name
Display package(s) with the specified name.
@findex guix-packages-by-regexp
@vindex guix-package-search-params
@item M-x guix-packages-by-regexp
Search for packages by a specified regexp. By default, ``name'',
``synopsis'' and ``description'' of the packages will be searched. This
can be changed by modifying @code{guix-package-search-params} variable.
@findex guix-packages-by-name-regexp
@item M-x guix-packages-by-name-regexp
Search for packages with names matching a specified regexp. This
command is the same as @code{guix-packages-by-regexp}, except only a
package ``name'' is searched.
@findex guix-packages-by-license
@item M-x guix-packages-by-license
Display package(s) with the specified license.
@ -391,19 +404,6 @@ Display packages from the specified file with @code{operating-system}
declaration (@pxref{Using the Configuration System,,, guix, The GNU
Guix Reference Manual}).
@findex guix-search-by-regexp
@vindex guix-package-search-params
@item M-x guix-search-by-regexp
Search for packages by a specified regexp. By default, ``name'',
``synopsis'' and ``description'' of the packages will be searched. This
can be changed by modifying @code{guix-package-search-params} variable.
@findex guix-search-by-name
@item M-x guix-search-by-name
Search for packages with names matching a specified regexp. This
command is the same as @code{guix-search-by-regexp}, except only a
package ``name'' is searched.
@end table
@vindex guix-package-list-type

View file

@ -1,6 +1,6 @@
;;; guix-help.el --- Help commands -*- lexical-binding: t -*-
;; Copyright © 20162019 Alex Kost <alezost@gmail.com>
;; Copyright © 20162019, 2021 Alex Kost <alezost@gmail.com>
;; This file is part of Emacs-Guix.
@ -80,11 +80,11 @@ If ARG is non-nil (interactively with prefix), show Guix info manual."
guix-hidden-packages
guix-dependent-packages
guix-packages-by-name
guix-packages-by-regexp
guix-packages-by-name-regexp
guix-packages-by-license
guix-packages-by-location
guix-package-from-file
guix-search-by-name
guix-search-by-regexp
guix-packages-from-system-config-file
nil
guix-package-locations

View file

@ -1,6 +1,6 @@
;;; guix-popup.el --- Popup interface for Emacs-Guix commands
;; Copyright © 20182019 Alex Kost <alezost@gmail.com>
;; Copyright © 20182019, 2021 Alex Kost <alezost@gmail.com>
;; This file is part of Emacs-Guix.
@ -102,9 +102,9 @@ String is made of variable VAR-NAME and its value."
(?h "hidden" guix-hidden-packages)
"Search for packages"
(?n "by name" guix-packages-by-name)
(?N "by regexp (in name only)" guix-search-by-name)
(?N "by regexp (in name only)" guix-packages-by-name-regexp)
(?r "by regexp (in name, synopsis, description)"
guix-search-by-regexp)
guix-packages-by-regexp)
(?L "by location" guix-packages-by-location)
(?c "by license" guix-packages-by-license)
(?d "depending on other package(s)" guix-dependent-packages)

View file

@ -194,7 +194,7 @@ Or it may be some package variant that cannot be handled by
Emacs-Guix. For example, it may be so called 'canonical package'
used by '%%base-packages' in an operating-system declaration.
Try \"\\[guix-search-by-name]\" to find this package.")
Try \"\\[guix-packages-by-name-regexp]\" to find this package.")
(bui-get-string (car ids)))
(message ""))))

View file

@ -1521,6 +1521,40 @@ Interactively with prefix, prompt for PROFILE."
(guix-ui-read-package-profile))))
(guix-package-get-display profile 'name name))
;;;###autoload
(defun guix-packages-by-regexp (regexp &optional params profile)
"Search for Guix packages by REGEXP.
PARAMS are package parameters that should be searched.
If PARAMS are not specified, use `guix-package-search-params'.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-regexp "Regexp: " nil 'guix-package-search-history)
nil (guix-ui-read-package-profile)))
(guix-package-get-display profile 'regexp regexp
(or params guix-package-search-params)))
;;;###autoload
(define-obsolete-function-alias 'guix-search-by-regexp
'guix-packages-by-regexp "0.5.3")
;;;###autoload
(defun guix-packages-by-name-regexp (regexp &optional profile)
"Search for Guix packages matching REGEXP in a package name.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-string "Package name by regexp: "
nil 'guix-package-search-history)
(guix-ui-read-package-profile)))
(guix-packages-by-regexp regexp '(name) profile))
;;;###autoload
(define-obsolete-function-alias 'guix-search-by-name
'guix-packages-by-name-regexp "0.5.3")
;;;###autoload
(defun guix-packages-by-license (license &optional profile)
"Display Guix packages with LICENSE.
@ -1586,31 +1620,6 @@ installed in a system profile, use
(guix-package-get-display (or profile guix-system-profile)
'from-os-file file))
;;;###autoload
(defun guix-search-by-regexp (regexp &optional params profile)
"Search for Guix packages by REGEXP.
PARAMS are package parameters that should be searched.
If PARAMS are not specified, use `guix-package-search-params'.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-regexp "Regexp: " nil 'guix-package-search-history)
nil (guix-ui-read-package-profile)))
(guix-package-get-display profile 'regexp regexp
(or params guix-package-search-params)))
;;;###autoload
(defun guix-search-by-name (regexp &optional profile)
"Search for Guix packages matching REGEXP in a package name.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-string "Package name by regexp: "
nil 'guix-package-search-history)
(guix-ui-read-package-profile)))
(guix-search-by-regexp regexp '(name) profile))
;;;###autoload
(defun guix-installed-packages (&optional profile)
"Display information about installed Guix packages.