3 ms·
If you have any details, links, hints about how to accomplish this (for instance, where does one find a proper "emacsclient.service" file?) please consider your
by theophrastus 11y ago
If you have any details, links, hints about how to accomplish this (for instance, where does one find a proper "emacsclient.service" file?) please consider yourself emboldened
- wging 11y agoStarting 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.
- davexunit 11y agoI don't have a systemd example, but here's a GNU dmd service that I use which shows how to properly start/stop the daemon: https://git.dthompson.us/dotfiles.git/blob/HEAD:/dotfiles/.dmd.d/init.scm#l147 https://git.dthompson.us/dotfiles.git/blob/HEAD:/dotfiles/.d...
- qiushihe 11y agoI had a slightly different approach in that I made a script to launch Emacs server on-demand: https://github.com/qiushihe/dotpiles/blob/master/emacs/emacsl.sh https://github.com/qiushihe/dotpiles/blob/master/emacs/emacs...
- NoGravitas 11y agoI use the system service (emacs@.service) from [this blog post][0]. I used 'systemctl enable emacs@myusername.service' so that emacs is always started on boot. I have a one-liner shell script called 'em' that just runs 'emacsclient -t $*' so that it can be set as $VISUAL and used by whatever command line tools use that. [0]: http://blog.refu.co/?p=1296 http://blog.refu.co/?p=1296