Emacs command of the day: crux-sudo-edit from https://github.com/bbatsov/crux . Great for editing the current file, if it's owned by root.