3 ms·
Starting from systemd is a league beyond what I've done. But you might like this script: #!/bin/sh emacsclient -t $@ || (emacs --daemon && emacsclient
by wging 11y ago
Starting from systemd is a league beyond what I've done. But you might like this script:
#!/bin/sh
emacsclient -t $@ || (emacs --daemon && emacsclient -t $@)
You'll want something like
(unless (server-running-p)
(server-start))
in your init file.
- tbirdz 11y agoOr use emacsclient -t --alternative-editor="" and emacsclient will start the daemon if it hasn't already been started. You can also set the ALTERNATIVE_EDITOR environment variable to "" to achieve the same effect.