Hey Dan,
I guess you would have to check the process tree (via ps -ef) and see
whether emacs is somwhere the parent of your current shell.
For example (on HP-UX, needs adjustment for your shell):
ps -ef | grep `ps -ef | grep $$ | grep ksh | grep -v grep | awk '{ print
$3 }' ` >out
cat out | grep -v /ksh | grep -v grep | grep /emacs
if [[ $? = 0 ]] then
echo "We are emacs"
fi
-- Robert
"Dan Jacobson" <jidanni@jidanni.org> wrote in message
8765nc2i6n.fsf@jidanni.org">news:8765nc2i6n.fsf@jidanni.org...
How can a shell script tell that we can't talk back, i.e. we are
either in a batch job or a emacs compile session? test -t doesn't
catch the latter, nor does test -t 0. case $- in *i*) isn't too
helpful either. No, don't tell me how to talk back during compile
sessions, just tell me how to test...
--
http://jidanni.org/ Taiwan(04)25854780