only try to load crons if crontab is in /home/james/bin:/home/james/.guix-profile...
[james-home.git] / bin / emacs
blob53dbafd6db4368b05d57b9c84214b07e0a1077f0
1 #!/bin/sh
2 if [ -z $DISPLAY ]; then
3 OPT="-t"
4 else
5 OPT="-c"
6 fi
8 # find emacs
9 # default to /usr/bin/emacs
10 # if I'm have it installed via guix use that one.
11 EMACS=/usr/bin/emacs
12 [ -x $HOME/.guix-profile/bin/emacs ] && EMACS=$HOME/.guix-profile/bin/emacs
14 # $PATH should be set to find the proper emacsclient
15 # Add --no-site-lisp to keep Debian's slime from overwriting the one in melpa.
16 emacsclient ${OPT} "$@" || ( ${EMACS} --no-site-lisp --daemon; sleep 5; emacsclient ${OPT} "$@" )