I am hoping to define an interactive function that I can invoke with M-x <function-name>
and that will:
- Automatically grab the path to the file
Run the following code on it:
(require 'tramp) C-x C-f /sudo::/path/to/file
In case it is not clear, the goal is to have this function (re-)open the file in sudo
mode.
How can I go about writing this function? Sorry if this is a bit elementary, I have just started to learn elisp.