I wrote:
This is good! Reproducible test cases are a debugger's dream. I
see
it, too. When I run with edebug, I see that, on a "good" run,
ispell-process-line communicates with the subprocess, after which
ispell-filter is nil. On a "bad" run, after ispell-process-line
communicates with the subprocess, ispell-filter contains a list of
strings *from spellchecking SNP in line1.tex*! That's why it is getting
confused. So why is ispell-filter wrong?
I instrumented ispell-filter for debugging, and sure enough, it gets the
return string for SNP *after* it was requested to check "\label{".
Weirdly enough, it then gets the return string for STR! Somehow,
communication with the subprocess has gone badly awry.
I tried attaching strace to the aspell process. When I asked XEmacs to
check line1.tex, this is what I saw:
read(0, "!\n", 4096) = 2
read(0, "+\n", 4096) = 2
read(0, "^\\subsection{Comparison with \\te"..., 4096) = 74
times({tms_utime=8, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 374936
brk(0) = 0x8079000
brk(0x807a000) = 0x807a000
[snip a whole bunch of brk() calls]
times({tms_utime=17, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 374953
write(1, "& STR 18 37: STAR, STE, STIR, ST"..., 111) = 111
times({tms_utime=17, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 374953
times({tms_utime=23, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 374961
write(1, "& SNP 20 54: SNAP, SNIP, NP, SN,"..., 123) = 123
write(1, "\n", 1) = 1
Then when I told it to check line2.tex, strace said:
read(0, "!\n+\n^\\label{\n", 4096) = 13
times({tms_utime=23, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 375993
brk(0) = 0x81a3000
brk(0x81a4000) = 0x81a4000
times({tms_utime=32, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 376004
write(1, "& STR 18 37: STAR, STE, STIR, ST"..., 111) = 111
times({tms_utime=32, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 376004
times({tms_utime=38, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 376013
write(1, "& SNP 20 54: SNAP, SNIP, NP, SN,"..., 123) = 123
brk(0) = 0x81a4000
brk(0x81a5000) = 0x81a5000
write(1, "\n", 1) = 1
So ... it looks like the aspell process got the right input, and then
gave back the same output as the first time. Either ispell.el doesn't
know how to talk to aspell or this is an aspell bug.
It turns out that RedHat 9 has a rather old version of aspell. I
downloaded the latest version from
http://aspell.net/, and this behavior
has disappeared. That is, both buffers spell check correctly. I think
it is safe to say that this is an aspell bug, not an XEmacs bug.
Upgrade your aspell to make it go away.
--
Jerry James
http://www.ittc.ku.edu/~james/