bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46151: [External] : bug#46151: 28.0.50; Set revert-buffer-function i


From: Drew Adams
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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]