this has got to be trolling. right? right?! i'm so confused.
$ jobs
[4] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[5] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[6] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[7] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[8] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[9] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[10] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[11] Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[12]- Stopped emacsclient -a '' -nw [redacted] (wd: [redacted])
[13]+ Stopped emacsclient -a '' -nw [redacted]
But since they're all emacsclients it doesn't really matter. /private/tmp/foo.txt locked by jnpatel@mac... (pid 14836): (s, q, p, ?)?
because of the lock files? 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).