diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-15 18:08:51 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-15 18:12:39 -0700 |
commit | b45434316738d02ad7b660b0609420cde19aa2a6 (patch) | |
tree | fde01dfa690eb7c74441054a81ba84f159a3ef7a /scripts | |
parent | 9dd6d67f0fc6ddf766ab6ac783b10f9cc52eeb87 (diff) | |
download | dotfiles-b45434316738d02ad7b660b0609420cde19aa2a6.tar.gz |
combine s/d/emacsclient & update-emacs-daemon-environment
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desktop/emacsclient | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/scripts/desktop/emacsclient b/scripts/desktop/emacsclient deleted file mode 100755 index 8360b0e1..00000000 --- a/scripts/desktop/emacsclient +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# We also check whether there is something which looks like the installed -# Emacs running, as we do not want the in-tree emacsclient to try to connect -# to that, and whether there is a build in progress and no running daemon, as -# we don't want to start a new daemon until the build is finished. -# -# The idea is that I can always hit C-i e without worrying about builds. - -getopt=$(getopt -o "" -l installed -n scripts/desktop/emacsclient -- "$@") -eval "set - $getopt" -while true; do - case "$1" in - '--installed') mode="--installed"; shift; continue ;; - '--') shift; break ;; - esac -done -[ "$#" -eq 0 ] && set -- -nc - -processes=$(ps -o exe -u "$LOGNAME" -U "$LOGNAME") -echo "$processes" | grep -q "$HOME/src/emacs/src/emacs" && devel_running=true - -if [ "$devel_running" = true -a "$mode" = --installed ]; then - pgrep --full "$HOME/src/emacs/src/emacs" | while read pid; do - kill $pid - done - socket="/run/user/$(id -u)/emacs/server" - [ -e $socket ] && inotifywait -qqt 2 -e delete $socket -fi - -if [ "$mode" != --installed \ - -a -e "$HOME/src/emacs/admin/flagfile.melete" \ - -a -x "$HOME/src/emacs/lib-src/emacsclient" \ - -a -d "/usr/share/emacs-snapshot/site-lisp/elpa" ] \ - && ! echo "$processes" | grep -q $(command -v emacs) \ - && ! ( [ "$devel_running" != true ] && ps h -o pid -C make \ - | xargs pwdx | grep -q "$HOME/src/emacs" ); then - EMACSCLIENT="$HOME/src/emacs/lib-src/emacsclient" -else - EMACSCLIENT=$(command -v emacsclient) -fi - -exec "$EMACSCLIENT" -a "" "$@" |