Subject: bug#36981: 26.2; request: add searching by package name to list-packages

From: Stefan Kangas <[email-masked]>
Date: Thu, 19 Sep 2019 00:22:30 +0200

Federico Tedin <[email-masked]> writes:

> Hi Stefan, thanks for your input.

Hi again, and thanks for considering it.

> I think the "/" prefix keybindings are a good idea; however I'm not sure
> if it's OK to change an already existing keybinding. But on the other
> hand this is a really minor thing so I imagine it's not that much of a
> problem. The new names you chose for the commands also make more sense
> than the current ones, I don't have a problem with updating them.

It's neither a critical key binding nor a very long-standing one, so I
don't see the harm in changing it to a more logical one.  We'd have to
announce the change in NEWS though.  Of course, I'm not in any
position to make any decisions around here, so that's just my opinion.
If you agree, perhaps you'd be interested in adding that change to
your suggested patch.

On the other hand, just sticking to implementing the already suggested
command would also be an improvement.

But might I suggest that you in any case name the command
package-menu-filter-by-name?  It seems to me that it better describe
what this function does.

> > 1. How about implementing an option to search only the package names
> > using isearch?  Compare to dired-isearch-filenames.
>
> Didn't know about that command, looks really useful. The only problem I
> can think of implementing search that way is that it would stop being
> similar to `package-menu-filter', in the sense that it currently only
> shows packages that have matched the search, instead of jumping between
> packages that match. On the other hand, the way I've implemented the
> search is really primitive, so I guess using isearch would actually make
> it much more powerful.

I don't want to discourage you from continuing work on the filter
command by floating this idea.  Having filter commands and an isearch
option are not mutually exclusive.  On the contrary, I could see
myself wanting to use both.

Perhaps it's better to regard this idea as separate from the "filter
by name" command for now.  Maybe I shouldn't have sidetracked this
issue by even raising it, but it's good to hear that you agree that
it's not a bad idea.

> > 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.
>
> Nice! This is the first command in Emacs that I've used that has
> incremental search.  For this patch though I would like not to modify
> package-menu-filter and just stick to adding package-menu-search.

Sounds good to me.  We could always revisit the idea of making them
incremental later.

Best regards,
Stefan Kangas