File: emacsw

package info (click to toggle)
launcher 0.85-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 172 kB
  • ctags: 50
  • sloc: tcl: 887; makefile: 87; sh: 18
file content (24 lines) | stat: -rwxr-xr-x 596 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
## Emacsclient wrapper (emacsw)
##
## Launch emacsclient to handle a file if a server is already
## running. Otherwise launcher emacs. Should pass all arguments
## to emacsclient and be transparently invokeable as emacsclient
## except that stdout won't be displayed until emacsclient exits.
##
## Ethan Gold <etgold@cs.columbia.edu> 4/9/99
##

## server socket name
esock=/tmp/esrv${UID}-${HOSTNAME%%.*}
result="did nothing"
if [ -S $esock ]
then
    #echo "launching emacsclient"
    result=`emacsclient $@`
else
    #echo "launching emacs"
    result=`emacs $@`
fi
echo $result
exit