[Top][All Lists]

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

Help - Tcl/Expect Parsing Strangeness In Emacs Shell

From: Tennis Smith
Subject: Help - Tcl/Expect Parsing Strangeness In Emacs Shell
Date: Mon, 16 Aug 2004 11:21:09 -0700


Apologies for the wide distribution. This is in one of those grey areas
between tools so I'm not sure where it fits.

Basically, in certain circumstances, Tcl/Expect doesn't seem to work
correctly while in a tcsh/bash shell under Emacs.  Application output that
Expect is "expecting" will not be detected.

I ran into this while trying to parse the output of a telnet session to a MS
Windows machine.  Initially, I thought it was something wrong with the
Windows output (or with your humble programmer ;-)). During debugging, I've
winnowed out the various Windows and networking components . Now I can
recreate it at will on Solaris and Linux with no telnet/Windows involvement.

By contrast, everything works correctly on rxvt, xterm and Emacs version
20.7.1 and earlier.

The only environment that consistently has this occur is Emacs versions and later. In addition, this only happens parsing strings with
"tabs" (0x09) frequently used.

How to observe/recreate:

Attached, is tar file with two tiny scripts that illustrate the problem.

After uncompress/untar, run the "test.exp" script. The "test.exp" script
spawns a task that will print a reproduction of a command output. When
everything is working correctly, you'll see two copies of the command
output, one from stdout and one printed from expect itself.

If run under an xterm, expect will be able to detect output and put it into
the "accum" variable (which is then printed). But, if run in a shell under
Emacs (tcsh or bash in my case), expect will not detect the data and will
put only blank lines into the "accum" variable.

Has anyone else seen this?


begin 666 exptest.tar.Z
M'YV0+EZ4P0.'3IDY=%X`6,BPH<.'$"-*G$BQ8D48,&C N%&C!@",-&K Z/@1
M(\89,4J:7(D10 P8+V_<H"&address@hidden;'V/$N!'#(PB/%H,*'4JTZ,,Z",/(`0$"
M(T>/($629(E2Y<H8,V[ <%E7)DV;.&%JK D`Q."YD",?3;JTZ=.H4[U:Q9I2
MLN?/H$-['A'address@hidden;E[,0:address@hidden @\L&/+GDV[MNW;N'/G5C"G#!T0E 
MQ)X8.E:(( %$1!\%3)FN3F.&address@hidden;F&F. P0+5H4/YY\
M>?/GSUWKGD^_OOW:"A3 J4-G#@@1:< QQAMNF)'&&5PHP(4;"UZ!&AEOW.&?
M#":!D 04( Q!H(%GU"%'6FD0F."""Q9!!QIER.&&;R"address@hidden@@address@hidden';
M'6_(L88.(S+H1@(:0B5>B&ZT, <<WE&7QG=$.#$%"%/488:!>##E`@@address@hidden
M`A>"$ 099,address@hidden"F6B>J::96<+@@IMP;AFE&"O^UD08<ZRQYIYI]HFE
M8V\&"L.61)1A1AAUL/';$6F5<4<8>? I:9I9]ECBB2G6V>*+PH&PDPPUWICC
MCI;^&.2*8]!!I)%(CJ$DDTY"*2655OZY99=?ACFFG[Q*FN6G+L200[ WX.""
ML3&(H(!H\,8K[[ST:C46008A]$*^=+A 5KVBU;717AGIA==*?;&$T4XTX/12
M3#/5=%-.,] D0V./`:PQ1$BI59E35F'VU699;address@hidden&FGSWQ2SS
MS+#QQF)P*8) G''(*<><<]L!AP9UUD4G--%!=_==>*FB5QX)YZ6W7L_N`1W?
M:S1GK35N^8W0FH5VE $"'7*D40898P_M'address@hidden&&3F_M5J+;X,@!IYH7"G$
M7+KS3F 7) ;->A%80%'address@hidden>>address@hidden"PH1Q!1(;)ZB
M]&8G.B>0#G40A"")W. NWL A#'address@hidden"B%K:XP2UP65 %
M^(4W\ <address@hidden&)#M4%.'PQF-AD93E>&<>$/E18<address@hidden
MMJN @ V;Z=L2M9>J)CXQBE.:8A?ZH#,S`I&%+7IA#)DB`C&>#01D!,&CTJ J
M-P9O*20,0Q6MR,<RL*$W?;3BZ@")Q"(:IY-]F* 14!,&W!F2C"KT(PB>\T4%
MT' __?E/)W5 @DZZ*V6XS*4N=\G+7OKRE\ ,IC"'2<QB&O.8R$RF,I?)S&8Z

reply via email to

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