From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 2/2] emacs: Add 'guix-search-by-name'.
Date: Thu, 14 Jan 2016 02:14:10 +0300 [thread overview]
Message-ID: <1452726850-16850-3-git-send-email-alezost@gmail.com> (raw)
In-Reply-To: <1452726850-16850-1-git-send-email-alezost@gmail.com>
* emacs/guix-ui-package.el (guix-search-by-name): New command.
* doc/emacs.texi (Emacs Commands): Document it.
---
doc/emacs.texi | 5 +++++
emacs/guix-ui-package.el | 11 +++++++++++
2 files changed, 16 insertions(+)
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 7edaedc..eb470ab 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -163,6 +163,11 @@ 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.
+@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
By default, these commands display each output on a separate line. If
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 0696c4b..2951452 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -939,6 +939,17 @@ Interactively with prefix, prompt for PROFILE."
(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-profile)))
+ (guix-search-by-regexp regexp '(name) profile))
+
+;;;###autoload
(defun guix-installed-packages (&optional profile)
"Display information about installed Guix packages.
If PROFILE is nil, use `guix-current-profile'.
--
2.6.3
next prev parent reply other threads:[~2016-01-13 23:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 23:14 [PATCH 0/2] "M-x guix-search-by-name" and "M-x guix-packages-by-name" Alex Kost
2016-01-13 23:14 ` [PATCH 1/2] emacs: Rename 'guix-search-by-name' to 'guix-packages-by-name' Alex Kost
2016-01-17 20:31 ` Ludovic Courtès
2016-01-13 23:14 ` Alex Kost [this message]
2016-01-17 20:32 ` [PATCH 2/2] emacs: Add 'guix-search-by-name' Ludovic Courtès
2016-01-17 20:31 ` [PATCH 0/2] "M-x guix-search-by-name" and "M-x guix-packages-by-name" Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452726850-16850-3-git-send-email-alezost@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).