Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by __david__ on Friday October 30, 2015 @02:26PM
(#10479577)
Ha, I still do that!
But since they're all emacsclients it doesn't really matter.
[ Parent
| on HN ]
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by jnpatel on Friday October 30, 2015 @05:01PM
(#10480520)
Don't you frequently deal with:
/private/tmp/foo.txt locked by jnpatel@mac... (pid 14836): (s, q, p, ?)?
because of the lock files?
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by __david__ on Friday October 30, 2015 @05:25PM
(#10480630)
Nope, because emacsclient ends up opening them all in the same process (that's the beauty/entire point): Fork off an emacs in the background:
emacs --daemon
Then run emacsclient to connect to it (open a new buffer in the daemon and switch to it): emacsclient -nw some_file
When you "quit" (with C-x C-c), it really just quits that client, but the main emacs is left running.This has a number of benefits: 1) no locks like you mention, 2) access to all open buffers (even unsaved) from every emacsclient that's currently running (since they're really all just opening buffers in a single instance), 3) blazing startup speed (emacs is already running, you're just connecting to it and splatting a new buffer to the terminal).
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by krylon on Friday October 30, 2015 @08:26PM
(#10481320)
I still remember how happy I was when I found out about that. On all servers I use (at home and at work), starting an emacs daemon is usually among the first things I do after rebooting.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by rcthompson on Friday October 30, 2015 @05:34PM
(#10480675)
Do you know about the "--no-wait" option for emacsclient?
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by __david__ on Friday October 30, 2015 @06:20PM
(#10480883)
Yes. But it doesn't play well with "-nw".
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by rcthompson on Friday October 30, 2015 @08:03PM
(#10481266)
Ah yes, good point. In that case, the solution is `C-x #` to finish an emacsclient session without causing the server to quit.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by __david__ on Friday October 30, 2015 @08:20PM
(#10481305)
Luckily C-x C-c also does that now.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by api_or_ipa on Friday October 30, 2015 @04:45PM
(#10480442)
`fg` is your friend