From 7d8d1184b71c8357dfa7df8047404d778c09c632 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 20 Feb 2018 15:40:22 -0500 Subject: [PATCH] Make find-file-as-root reuse current buffer --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3c06f6f..14ebdaa 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -108,7 +108,7 @@ (setq tramp-default-method "ssh") (defun find-file-as-root () (interactive) - (find-file (concat "/sudo::" (buffer-file-name))))) + (find-alternate-file (concat "/sudo::" (buffer-file-name))))) (use-package comint :config