bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shell script can't tell if in compile window


From: Dan Jacobson
Subject: shell script can't tell if in compile window
Date: Tue, 17 Jun 2003 16:11:49 +0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

The following message is a courtesy copy of an article
that has been posted to gmane.emacs.bugs as well.

Gentlemen, in the shell originally we could check with test -t or case
$- in *i* or $TERM to tell if we are in an interactive session.

Now compile mode has messed this all up so there is no way to test
anymore.  All tests act like we are just as interactive as if we were
at a shell window. By the way, the painful "check the process tree" method
http://groups.google.com/groups?selm=jyqHa.2671%243Q7.719%40news.cpqcorp.net
still wouldn't enable a shell script to tell the difference between an
{emacs compile window} vs. {emacs shell window, non-emacs shell window}
I bet.

Hmmm, how about you powder users, does (shell-command "echo $TERM")
and (compile "echo $TERM") get real live term names like me (on debian,
no .profile stuff)?  Aren't
these usually exported when emacs encounters them?  Should TERM be
removed from compile mode's environment?

Why does (shell-command "test -t&&tty") get so far to tell me 'not a
tty'!? Wait, (shell-command "/usr/bin/test -t&&tty") doesn't get that
far, good.  Aren't they supposed to act the same?  Ok, do I send a
coreutils bug or a bash bug?? Must be a bash bug because how could
test -t && tty ever pass the first hurdle.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]