# Please enter the commit message for your changes.
[safanaj_home.git] / bin / run_emacs
blobb8a7b59370fb9bc2467c98b5a1f9c5993ab01495
1 #!/bin/bash
2 if [ x"$___BASH_PROFILE_IS_EXPORTED" != xyes ]; then
3 . ~/.profile
4 fi
6 #use_this_emacs=/gnu/src/onVersion/Emacs/BUILD-emacs--devo/src/emacs
7 use_this_emacs=emacs
8 dpy=
10 #trap "trap $use_this_emacs 17 ; $use_this_emacs " 17 ; $use_this_emacs
11 for_ver=
12 #CHECK VERSION
14 if [ x"$DISPLAY" != x ]; then
15 dpy="-d $DISPLAY"
18 # else
19 # dpy="-t"
20 # fi
22 alt="-a emacs"
23 arg=
24 sock=
25 if test -e /tmp/emacs`id -u`/server ; then
26 srv="-f /tmp/emacs`id -u`/server"
27 if test -n "$1" ; then
28 arg="$1"
29 else
30 arg="~/TODO"
32 echo " emacsclient -n $alt $dpy $srv $arg"
33 exec emacsclient -n $alt $for_ver $dpy $arg
34 else
35 if test -n "$1" ; then
36 arg="$1"
38 echo "emacs $arg"
39 # exec $use_this_emacs $arg