3 ms·
I'm confused by your workflow. Why are you opening a second Emacs instance? In Emacs you just C-x C-f /path/to/config, for sudo C-x C-f /sudo::/path/to/config.
by b5n 6y ago
I'm confused by your workflow. Why are you opening a second Emacs instance?
In Emacs you just C-x C-f /path/to/config, for sudo C-x C-f /sudo::/path/to/config.
Starting location will be home, or the parent of the active file (if the active buffer is an editor).
- dnquark 6y agotl;dr: terminal -> vim == less context switching Even though I live in Emacs, I frequently use GP's workflow as well. For me, it's often the fact that I am already working in the terminal when I need to edit the config, so going to Emacs is a context switch. Moreover, I often fist do a cd /path/to/config; once there it's trivial to do vim foo or sudo vim foo. I have an alias that can send that file to emacsclient -- but again, it takes me away from the terminal, and will not work with sudo. Also, I've tried possibly every emacs package that helps with path completion, but they all seem to get in the way when I already know exactly what I want. Vanilla bash completion (and don't forget about fzf!!) are a better experience for me; YMMV.
- JJMcJ 6y agoTIL about /sudo:: I will look at it further. For the other it's usually something like /usr/x/y/z/a/b/c/config.ini Yeah, I want to type that path into Emacs when I can vi config.ini or sudo vi config.ini and be done in seconds.