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

From: Štěpán Němec <[email-masked]>
Date: Sun, 08 Sep 2019 17:20:00 +0200

I don't use package.el, but here are a few observations:

> From: Federico Tedin <[email-masked]>
> Date: Sun, 8 Sep 2019 02:38:43 +0200
> Subject: [PATCH 1/1] Search packages by name in list-packages (Bug#36981)
>
> +  (if (or keywords (and packages (listp packages)))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AKA "(consp packages)", though maybe you find your version more
descriptive.

> +(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. 

> +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?

Thanks!

-- 
Štěpán