[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36981: 26.2; request: add searching by package name to list-packages
From: |
Federico Tedin |
Subject: |
bug#36981: 26.2; request: add searching by package name to list-packages |
Date: |
Mon, 09 Sep 2019 22:54:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
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
Description: patch
- bug#36981: 26.2; request: add searching by package name to list-packages, Federico Tedin, 2019/09/07
- bug#36981: 26.2; request: add searching by package name to list-packages, Stefan Kangas, 2019/09/15
- bug#36981: 26.2; request: add searching by package name to list-packages, Federico Tedin, 2019/09/18
- bug#36981: 26.2; request: add searching by package name to list-packages, Stefan Kangas, 2019/09/18
- bug#36981: 26.2; request: add searching by package name to list-packages, Juri Linkov, 2019/09/19
- bug#36981: 26.2; request: add searching by package name to list-packages, Federico Tedin, 2019/09/20
- bug#36981: 26.2; request: add searching by package name to list-packages, Stefan Kangas, 2019/09/20
- bug#36981: 26.2; request: add searching by package name to list-packages, Federico Tedin, 2019/09/26
- bug#36981: 26.2; request: add searching by package name to list-packages, Stefan Kangas, 2019/09/27