From b45434316738d02ad7b660b0609420cde19aa2a6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 15 Apr 2022 18:08:51 -0700 Subject: combine s/d/emacsclient & update-emacs-daemon-environment --- scripts/desktop/emacsclient | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 scripts/desktop/emacsclient (limited to 'scripts') 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 "" "$@" -- cgit v1.2.3