[comp.emacs] emacsclient -- exec's to emacs

wjc@ho5cad.ATT.COM (Bill Carpenter) (03/22/89)

In article <FAULKNER.89Mar20100743@jmullins.harvard.edu> faulkner@HUSC6.HARVARD.EDU (Don Faulkner) writes:
>Why not make emacsclient exec "emacs" if no server exists?
>
> [suggests modification to emacsclient source code]

I've got a better idea.  Leave the code the way it is and help your
self to this shell script:

#================================================================
# if can run emacsclient (gnuemacs is already running someplace) do
# it; else invoke a GNUemacs proper.

# expecting $GNU from GYOU!

$GNU/etc/emacsclient "$@" && exit
exec gnuemacs "$@"
================================================================

That's right.  Exec'ing "emacs" on my machine would get you a
surprise.
--
--
   Bill Carpenter         att!ho5cad!wjc  or  attmail!bill