Subject: bug#35504: 26.2; Key `g' should run `package-menu-refresh' in the *Packages* buffer

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 30 Apr 2019 16:47:53 +0100

severity 35504 wishlist
quit

Rudi Schlatte <[email-masked]> writes:

> The ‘g’ key seems to be the standard way to refresh a list of things.
> For example, ‘g’ runs ‘gnus-group-get-new-news’ in the gnus *Group*
> buffer and ‘revert-buffer’ in vc-dir-mode.  In the package list,
> ‘package-menu-refresh’ is run by the ‘r’ key instead.
>
> Since ‘g’ is unbound in ‘package-menu-mode’, could a binding be added to
> run ‘package-menu-refresh’ for that key?

It is not unbound; it is bound to the standard command revert-buffer,
which in this case calls tabulated-list-revert, which in turn runs
tabulated-list-revert-hook, which in turn calls package-menu--refresh.

[The command revert-buffer is bound to 'g' by default in modes derived
 from special-mode; see (info "(elisp) Basic Major Modes").]

Having said that, I know neither what the intention is behind having two
keys bound to different commands, nor why the 'g' key is not documented
under (info "(emacs) Package Menu").  Hopefully someone else can shed
some light upon this.

At least two other people, including Stefan (CCed), share your
preference:

https://lists.gnu.org/archive/html/emacs-devel/2010-10/msg01092.html
https://lists.gnu.org/archive/html/emacs-devel/2010-10/msg01097.html

FWIW, as someone who doesn't understand the purpose of the
package-menu--refresh binding, I am also in favour of merging
the 'r' and 'g' bindings.

Thanks,

-- 
Basil