Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've known this was possible for many years; but on a lark, I just wrote a microfunction that opens, in my local Emacs, a remote file I often have to edit as root. I don't live in Emacs, but there's no denying that, if I'm already in Emacs and I need to edit this file, I just saved myself a small amount of faffing about; I've also added my local init as a site for future automations.

  ;; Update [redacted]
  (defun [redacted] ()
    (interactive)
    (find-file "/ssh:[me]@[host]|sudo:[host]:[file]"))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: