GNU bug report logs -
#76974
31.0.50; [wishlist] Add global key binding for tramp-revert-buffer-with-sudo
Previous Next
Reported by: Michael Albinus <michael.albinus <at> gmx.de>
Date: Wed, 12 Mar 2025 08:29:01 UTC
Severity: wishlist
Found in version 31.0.50
Fixed in version 31.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2025-03-12 05:58, Robert Pluim wrote:
>>>>>> On Wed, 12 Mar 2025 02:43:18 -0700, Daniel Colascione
>>>>>> <dancol <at> dancol.org> said:
>
> Daniel> On March 12, 2025 1:50:43 AM PDT, "Stephen Berman via Bug
> reports for
> Daniel> GNU Emacs, the Swiss army knife of text editors"
> Daniel> <bug-gnu-emacs <at> gnu.org> wrote:
> >> On Wed, 12 Mar 2025 09:27:50 +0100 Michael Albinus via "Bug
> reports
> >> for GNU Emacs, the Swiss army knife of text editors"
> >> <bug-gnu-emacs <at> gnu.org> wrote:
> >>
> >>> tramp-revert-buffer-with-sudo has been added to Emacs 30.1. I
> propose to
> >>> give it a global key binding 'C-x @'. With this binding, it is
> more
> >>> simple to revert the current buffer to visit with "sudo"
> >>> permissions. This is useful for buffers visiting a file, or for
> dired
> >>> buffers.
> >>
> >> `C-x @' is the prefix for the `event-apply-*-modifier' functions
> in the
> >> globally accessible function-key-map.
>
>
> Daniel> This prefix binding is sitting on some pretty valuable real
> estate ---
> Daniel> not as valuable as C-o, granted, but still. Is the modifier
> prefix
> Daniel> feature justifying its squatting on this binding? I don't
> think I've
> Daniel> ever used it on purpose, and keyboards with missing
> essential
> Daniel> modifiers are a rarity. Seems like a niche feature to
> enable with a
> Daniel> mode or something.
>
> Itʼs one of those things that are useless until you need it, and then
> you *really* need it 🙂
>
> Daniel> That said, does the sudo feature (which is great and sorely
> needed)
> Daniel> need such a prominent keybinding? Might M-x sudo be
> sufficient? People
> Daniel> type s u d o in the terminal all the time.
>
> How about "C-u C-u M-x revert-buffer", and then people can choose
> their own key binding? Sticking it on "C-x @" or "C-x |" seems like
> overkill.
FWIW, I'm not a fan of this "tap C-u seventeen times while hopping on
one leg
under the full moon" UI paradigm that parts of the system have. C-u
C-SPC isn't
great either. I'd hope we could move more towards named commands and
less universal
prefix as a generic identifier that means different things in different
contexts.
I'd also find M-x s u d o a lot more convenient than C-u C-u M-x [...].
Not every
possible command needs a keybinding.
This bug report was last modified 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.