From 2c9f6794330fe057c9b27a94dc864bbe80902418 Mon Sep 17 00:00:00 2001 From: dx Date: Wed, 10 Jun 2020 18:09:30 +0100 Subject: +simple eserver script This will substitute with the systemd server for emacs server, this will hopefully fix some of the issues with persistence. --- Scripts/.local/scripts/eserver | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 Scripts/.local/scripts/eserver (limited to 'Scripts/.local/scripts/eserver') diff --git a/Scripts/.local/scripts/eserver b/Scripts/.local/scripts/eserver new file mode 100755 index 0000000..b613bba --- /dev/null +++ b/Scripts/.local/scripts/eserver @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +if [ $1 = "restart" ] +then + eserver stop + eserver start +elif [ $1 = "start" ] +then + if [ -e "/tmp/emacs-server-id" ] + then + echo "Server running already!" + else + emacs --bg-daemon=MAIN + touch /tmp/emacs-server + fi +elif [ $1 = "stop" ] +then + eserver --eval "(kill-emacs)" + rm /tmp/emacs-server +else + emacsclient -s MAIN $@ +fi -- cgit v1.2.3-13-gbd6f