GNU bug report logs - #46151
28.0.50; Set revert-buffer-function in shell command output buffers

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Thu, 28 Jan 2021 06:23:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Michael Welsh Duggan <mwd <at> md5i.com>
Cc: Sean Whitton <spwhitton <at> spwhitton.name>, "46151 <at> debbugs.gnu.org" <46151 <at> debbugs.gnu.org>, Juri Linkov <juri <at> linkov.net>
Subject: bug#46151: [External] : bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers
Date: Sun, 31 Jan 2021 17:57:02 +0000
> This reminds me that I've often found it odd that there's no global
> binding for `revert-buffer' -- I think there should be, because it's
> such a useful command.

Yes, very useful.

Dunno whether we need to bind it to a key by
default, however.  Users who use it a lot will
bind it themselves.  And it already has various
(different) bindings in different modes.  And
for modes where it makes no sense, well, it
makes no sense. ;-)

If we do sacrifice another new key binding for
it then it should preferably not be a key that's
repeatable.

(Personally, because key `F5' does that on MS
Windows, I bind `F5' to it.  But yes, that wastes
a repeatable key.  Is `F5' used beyond MS Windows,
e.g. for web browsers on other platforms?)

> Sean suggested `C-c C-r', which is nicely mnemonic, and is natural as a
> non-complicated alternative to `C-c C-f' when trying to reload a file
> (since `C-c C-f' has a lot of annoying DWIM stuff going on).

`C-r' is conventionally an opposite to `C-s'
(e.g. for search).  It's best to save `C-r'
for some (future or 3rd-party) need where
there's an opposite action that can be bound
to `C-s'.

As an example, my code binds `C-x / C-s' and
`C-x / C-r' to commands that search forward
and backward within defined zones.

> We can't use `C-c C-g', I guess, since we try to avoid keystrokes that
> involve `C-g' (since `C-g' should reliably quit), but that would also
> be a natural keystroke, since `revert-buffer' is bound to `g' in
> `special-mode'.
> 
> Any opinions?

Overall, my opinion is to NOT bind it by default.
Yes, it's useful.

But it's also easy to do with `M-x revert'.  (And
then repeat that as a previous command, as needed.)

And it has many existing bindings, for modes where
it's used frequently.





This bug report was last modified 4 years and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.