Subject: 24.0.95; regression: comint-output-filter-functions / ansi-color-process-output

From: "Roland Winkler" <[email-masked]>
Date: Wed, 16 May 2012 17:46:50 -0500

Some not so old code that works fine with Emacs 23 is giving me
unexpected trouble with Emacs 24. Essentially, it uses a mode
derived from comint-mode. It sends input via comint-simple-send and
comint-send-input, but it has its own output filters. In Emacs 24,
ansi-color-process-output has been added to the hook
comint-output-filter-functions. This hook is also run by
comint-send-input. ansi-color-process-output references the variable
comint-last-output-start. Upon start-up comint-mode assigns this
variable a marker, but it does not give this marker a useful value.
(Only comint-output-filter assigns a buffer position to
comint-last-output-start.)
ansi-color-process-output checks that comint-last-output-start is
non-nil. But it does not handle the case that comint-last-output-start
holds a marker that does not point anywhere. So this code fails.

comint-last-output-start is an undocumented variable and I have not
fully understood what it is supposed to do. Yet it appears to me
that comint.el and ansi-color.el depend on each other in a too
sophisticated way.

In GNU Emacs 24.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2012-04-04 on regnitz
Windowing system distributor `The X.Org Foundation', version 11.0.10706000