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 #20 received at 36981 <at> debbugs.gnu.org (full text, mbox):
Federico Tedin <federicotedin <at> gmail.com> writes:
> ndame <emacsuser <at> freemail.hu> writes:
>
> > When installing a package from list-packages it's often
> > inconvenient to find a package which has a string which occurs
> > many times in the packages buffer. (e.g. in the descriptions).
> >
> > The package buffer has f for filtering, but it filters only for
> > package keywords, not names.
> >
> > Add a new command s for search which searches (or filters) the
> > package list by a substring match on the package name.
>
> I've implemented this feature using the "s" key as you suggested. I'm
> attaching a patch with my changes.
Thanks for working on this.
My first observation is that the search you have implemented works
very much like the package-menu-filter command bound to "f".
Maybe it would be better to put all the filtering commands on "/", and
use something like the following key bindings:
"/ n" - package-menu-search [from "s"]
"/ k" - package-menu-filter [from "f"]
And add the new command and key binding:
"/ /" - package-menu-clear-filter
This would be more in line with filtering in ibuffer, bookmark-bmenu,
and others. Later, we could add more filters (for example to filter
by status, archive, time since update, etc.). But then we probably
want to rename as follows:
package-menu-search => package-menu-filter-by-name
package-menu-filter => package-menu-filter-by-keyword
Also, this would free up the "s" key for a sorting command, which is
in line with the key binding in e.g. dired.
I also have some other, related ideas:
1. How about implementing an option to search only the package names
using isearch? Compare to dired-isearch-filenames.
2. How about making the filtering for both package-menu-search and
package-menu-filter interactive -- that is, that the commands shows
the results as you type keys? One could look at bookmark-bmenu-search
for inspiration.
Best regards,
Stefan Kangas
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.