Open a file with su/sudo inside Emacs
- by Chris Conway
Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is
(require 'tramp)
C-c C-f /sudo::/path/to/file
but this requires an expensive round-trip through SSH. Is there a more direct way?
[EDIT] @JBB is right. I want to be able to invoke…