#3256: Extra EOT from NoBuffering mode in emacs
-------------------+--------------------------------------------------------
Reporter: judah | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.3 | Severity: normal
Keywords: | Testcase:
Os: Linux | Architecture: Unknown/Multiple
-------------------+--------------------------------------------------------
Compile the following program:
{{{
import System.IO
main = hSetBuffering stdin NoBuffering >> getLine >>= print
}}}
Then start emacs, run M-x shell, and start the above program. Paste the
output of {{{replicate 252 'x'}}} as input and press return. An extra EOT
character is added to the end of the input:
{{{
$ ./foo
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\\
EOT"
}}}
I can make this happen consistently using Ubuntu 8.04.2 and emacs-22.1.1.
I can't reproduce it on OS X or outside of emacs's shell.
This was originally reported on the Haskeline bug tracker, as it affects
ghci/haskeline: http://trac.haskell.org/haskeline/ticket/79 . From that
ticket:
> The problem seems to be that Emacs does not send all of the input at
> once:
> If STRING is more than 500 characters long, it is sent in several
> bunches. This may happen even for shorter strings.
> (From the documentation of process-send-string in GNU Emacs 23.0.93.1.)
See also the following message:
http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/15591/focus=15632.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3256>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs