From 8181563f8cbd203d1a1b08695e4ba647e63e7bb0 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 17 Oct 2023 11:41:12 +0200 Subject: [PATCH] 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) --- lisp/net/tramp-cmds.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2