I know how to open/edit files in Emacs as root with sudo, using Tramp. I wonder if there is a way to run Emacs commands with sudo too, without opening a shell?
Something like:
sudo M-x find-name-dired
or
M-x sudo find-name-dired
for example.
I know how to open/edit files in Emacs as root with sudo, using Tramp. I wonder if there is a way to run Emacs commands with sudo too, without opening a shell?
Something like:
sudo M-x find-name-dired
or
M-x sudo find-name-dired
for example.
If your command involves some path on the filesystem it is possible to take advantage of tramp like this: M-x find-name-dired RET /sudo::/your/path
.