From: Michael Albinus Date: Tue, 17 Oct 2023 09:41:12 +0000 (+0200) Subject: Fix tramp-revert-buffer-with-sudo X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8181563f8cbd203d1a1b08695e4ba647e63e7bb0;p=emacs.git Fix tramp-revert-buffer-with-sudo * lisp/net/tramp-cmds.el (tramp-revert-buffer-with-sudo): Use `buffer-file-name' instead of `buffer-name'. (Bug#66571) --- diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 22fb7eee8f3..f56c93c370d 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -610,7 +610,7 @@ If the buffer runs `dired', the buffer is reverted." (interactive) (cond ((buffer-file-name) - (find-alternate-file (tramp-file-name-with-sudo (buffer-name)))) + (find-alternate-file (tramp-file-name-with-sudo (buffer-file-name)))) ((tramp-dired-buffer-p) (dired-unadvertise (expand-file-name default-directory)) (setq default-directory (tramp-file-name-with-sudo default-directory)