Sudo-edit

Here’s a nifty bit of Elisp to make opening a file as root a bit easier:

When I first saw it, the idea seemed familiar and it is, in fact, very similar to some code offered by Bozhidar Batsov. I (very) slightly prefer Batsov’s version because it handles my most frequent use case by default. Most of the time when I want to edit a root file, I forget to open it with the sudo tag and have to abort the edit and reopen it. Batsov’s version handles this automatically.

This entry was posted in General and tagged . Bookmark the permalink.