help-gnu-emacs
[Top][All Lists]
Advanced

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

Help - Expect Parsing Strangeness In Emacs Shell


From: Tennis Smith (tennis)
Subject: Help - Expect Parsing Strangeness In Emacs Shell
Date: Sun, 15 Aug 2004 14:07:30 -0700

Hi,

Apologies for the wide distribution. This is in one of those grey areas
between tools.

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 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
21.2.95.2 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? 

TIA,
-Tennis

Attachment: exptest.tar.Z
Description: Unix compressed data


reply via email to

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