1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Improve tramp-*-with-sudo commands

* doc/emacs/dired.texi (Dired Visiting):
Add tramp-dired-find-file-with-sudo.

* doc/emacs/files.texi (Reverting):
Add tramp-revert-buffer-with-sudo.

* doc/misc/tramp.texi (Ad-hoc multi-hops): Extend wrt
`tramp-*-with-sudo' commands.

* etc/NEWS: Add tramp-dired-find-file-with-sudo.
Fix typos.

* lisp/bindings.el (ctl-x-x-map):
* lisp/dired.el (dired-mode-map): Add "@" binding.  (Bug#76974)

* lisp/net/tramp-cmds.el (dired-get-file-for-visit): Declare.
(with-tramp-file-name-with-method): New macro.
(tramp-revert-buffer-with-sudo): Autoload.  Preserve position.
Use `with-tramp-file-name-with-method'.
(tramp-dired-find-file-with-sudo): New command.
This commit is contained in:
Michael Albinus 2025-03-14 16:31:51 +01:00
parent 21371aa106
commit 24ffcbb3da
7 changed files with 120 additions and 58 deletions

View file

@ -1606,7 +1606,8 @@ if `inhibit-field-text-motion' is non-nil."
"u" #'rename-uniquely
"n" #'clone-buffer
"i" #'insert-buffer
"t" #'toggle-truncate-lines)
"t" #'toggle-truncate-lines
"@" #'tramp-revert-buffer-with-sudo)
(define-key ctl-x-map "x" ctl-x-x-map)
(define-key esc-map "\C-l" 'reposition-window)