GNU bug report logs -
#36981
26.2; request: add searching by package name to list-packages
Previous Next
Reported by: ndame <emacsuser <at> freemail.hu>
Date: Fri, 9 Aug 2019 07:22:02 UTC
Severity: wishlist
Tags: patch
Found in version 26.2
Fixed in version 27.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 36981 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Štěpán, thanks for your very detailed feedback.
>> + (if (or keywords (and packages (listp packages)))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AKA "(consp packages)", though maybe you find your version more
> descriptive.
Thanks, didn't know they were equivalent.
>> +(defun package-menu-search (name)
>> + "Filter the *Packages* buffer.
>> +Show only those items whose name matches NAME. If NAME is nil or an
>> +empty string, show all packages.
>
> If I was reading it as a user, I would appreciate it if the doc string
> was more specific regarding the NAME argument, e.g. said "matches the
> regular expression NAME" or something to that effect.
> Also, I think "empty string" is usually prefixed with "the", not "an",
> as there is only one such thing, e.g. (eq "" "") => t.
I've changed the docstring as you described, I think it's clearer now.
>> +To restore the full package list, type `q'."
>> + (interactive
>> + (list (read-from-minibuffer "Package name: ")
>> + current-prefix-arg))
> ^^^^^^^^^^^^^^^^^^
>
> Is this a remnant of some previous WIP version? The function now takes a
> single argument, right?
Correct! I forgot to remove it. I was experimenting with making 'C-u s'
search packages by name, but only considering packages that were already
listed. This way it was possible to combine the keyword search and name
search. I decided against it in the end because I'm not sure if it is a
necessary addition.
I'm attaching a new patch with some changes.
- Fede
[search.patch (text/x-diff, attachment)]
This bug report was last modified 5 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.