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
Sean Whitton <spwhitton <at> spwhitton.name> writes:
> Hello,
Hi Sean,
> Yes, when I saw this my first thought was the C-x x keymap. I think
> using one of TRAMP's commonly-used characters would be good, so:
>
> C-x x @
> or C-x x :
> or C-x x |
> or C-x x /
>
> I would suggest avoiding '|' because we might want to use it later for
> something pipe-related.
Welcome to our funny bikeshedding :-)
'@' is already used for indication of remoteness, see mode-line-remote.
And again, I prefer to use the same key in ctl-x-x-map and dired-mode-map.
> We would want it to be easy to customise this for specific systems so
> that the new binding always gets you root access, on systems that use
> doas or su instead of sudo.
> I see that there is already tramp-file-name-with-method for configuring
> this.
Yes. This must be improved, I guess.
> Have you considered renaming the command to something like
> tramp-revert-buffer-obtain-root ? Adding a global binding seems like a
> nice opportunity for a rename.
Yes, I did. Neither tramp-revert-buffer-with-sudo nor
tramp-revert-buffer-obtain-root are a perfect name. We don't know for
sure, that the method will be "sudo", nor that the user will be
"root". On my QNAP NAS, the root user is called "admin".
And using a Tramp specific name for a global bound command doesn't seem
to be proper as well.
I was thinking to introduce a new command
'revert-buffer-<something-better-than-sudo-or-root>', which will be an
alias of tramp-revert-buffer-with-sudo. But I'm bad with proper names.
This is a minor issue; we can find the best command name as long as
Emacs 31 is under development.
Best regards, Michael.
This bug report was last modified 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.