GNU bug report logs -
#6800
23.1; EOT / ^D inserted into comint input string
Previous Next
Reported by: David Fox <ddssff <at> gmail.com>
Date: Thu, 5 Aug 2010 15:14:02 UTC
Severity: normal
Merged with 7078
Found in versions 23.1, 24.0.50, 24.0.90
Done: David Fox <ddssff <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6800 in the body.
You can then email your comments to 6800 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6800
; Package
emacs
.
(Thu, 05 Aug 2010 15:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Fox <ddssff <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 05 Aug 2010 15:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When an input longer than 255 characters is typed into comint (or
shell) an EOT character (ascii 4, ^D) is inserted into the string.
This can cause an error depending how the sub process handles these
extra characters. For example, GHC doesn't like it when an EOT
appears inside of a string:
ghci
> Prelude> putStrLn "<a 241 character string>"
works fine, but
> Prelude> putStrLn "<a 242 character string>"
<interactive>:1:255: lexical error at character '\EOT'
I inserted a function to break up the input into comint-send-string to work
around the problem:
(require 'comint)
(defun comint-send-string (process string)
"Like `process-send-string', but also does extra bookkeeping for Comint
mode."
(if process
(with-current-buffer (if (processp process)
(process-buffer process)
(get-buffer process))
(comint-snapshot-last-prompt))
(comint-snapshot-last-prompt))
(my-process-send-string process string))
;; Break up the string so that we don't get EOT characters in our input
stream.
(defun my-process-send-string (process string)
(if (> (length string) 200)
(progn (process-send-string process (substring string 0 200))
(my-process-send-string process (substring string 200)))
(process-send-string process string)))
[Message part 2 (text/html, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6800
; Package
emacs
.
(Sat, 11 Sep 2010 14:00:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 6800 <at> debbugs.gnu.org (full text, mbox):
> When an input longer than 255 characters is typed into comint (or
> shell) an EOT character (ascii 4, ^D) is inserted into the string.
> This can cause an error depending how the sub process handles these
> extra characters. For example, GHC doesn't like it when an EOT
> appears inside of a string:
I believe this bug is fixed on the Emacs trunk (to become Emacs-24), but
the fix may introduce other problems. Apparently nobody knows how to
fix it right and there is about as much as no documentation at all on
this part of the behavior of ttys.
Stefan
Reply sent
to
Alan Third <alan <at> idiocy.org>
:
You have taken responsibility.
(Fri, 12 Aug 2016 18:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Fox <ddssff <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 12 Aug 2016 18:38:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 6800-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> When an input longer than 255 characters is typed into comint (or
>> shell) an EOT character (ascii 4, ^D) is inserted into the string.
>> This can cause an error depending how the sub process handles these
>> extra characters. For example, GHC doesn't like it when an EOT
>> appears inside of a string:
>
> I believe this bug is fixed on the Emacs trunk (to become Emacs-24), but
> the fix may introduce other problems. Apparently nobody knows how to
> fix it right and there is about as much as no documentation at all on
> this part of the behavior of ttys.
IIRC this code is no longer in Emacs. I'll close this bug.
--
Alan Third
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6800
; Package
emacs
.
(Fri, 12 Aug 2016 18:44:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 6800 <at> debbugs.gnu.org (full text, mbox):
On Fri, Aug 12, 2016 at 11:40:03AM -0700, David Fox wrote:
> On Fri, Aug 12, 2016 at 11:36 AM, Alan Third <alan <at> idiocy.org> wrote:
>
> > Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> >
> > >> When an input longer than 255 characters is typed into comint (or
> > >> shell) an EOT character (ascii 4, ^D) is inserted into the string.
> > >> This can cause an error depending how the sub process handles these
> > >> extra characters. For example, GHC doesn't like it when an EOT
> > >> appears inside of a string:
> > >
> > > I believe this bug is fixed on the Emacs trunk (to become Emacs-24), but
> > > the fix may introduce other problems. Apparently nobody knows how to
> > > fix it right and there is about as much as no documentation at all on
> > > this part of the behavior of ttys.
> >
> > IIRC this code is no longer in Emacs. I'll close this bug.
> >
> >
>
> I do know that commands longer than 4096 characters are truncated in emacs
> 24.3.1
I just looked at bug#7078 which talks about that. Perhaps these two
should be merged.
--
Alan Third
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 12 Aug 2016 18:45:02 GMT)
Full text and
rfc822 format available.
Merged 6800 7078.
Request was from
Alan Third <alan <at> idiocy.org>
to
control <at> debbugs.gnu.org
.
(Fri, 12 Aug 2016 18:46:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
David Fox <ddssff <at> gmail.com>
:
You have taken responsibility.
(Fri, 12 Aug 2016 19:53:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Fox <ddssff <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 12 Aug 2016 19:53:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 6800-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Aug 12, 2016 at 11:36 AM, Alan Third <alan <at> idiocy.org> wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
> >> When an input longer than 255 characters is typed into comint (or
> >> shell) an EOT character (ascii 4, ^D) is inserted into the string.
> >> This can cause an error depending how the sub process handles these
> >> extra characters. For example, GHC doesn't like it when an EOT
> >> appears inside of a string:
> >
> > I believe this bug is fixed on the Emacs trunk (to become Emacs-24), but
> > the fix may introduce other problems. Apparently nobody knows how to
> > fix it right and there is about as much as no documentation at all on
> > this part of the behavior of ttys.
>
> IIRC this code is no longer in Emacs. I'll close this bug.
>
> --
> Alan Third
>
I do know that commands longer than 4096 characters are truncated in emacs
24.3.1
[Message part 2 (text/html, inline)]
Reply sent
to
David Fox <ddssff <at> gmail.com>
:
You have taken responsibility.
(Fri, 12 Aug 2016 19:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Knut Anders Hatlen <kahatlen <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 12 Aug 2016 19:53:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 10 Sep 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.