error on first line sent to maxima



On Sat, 13 Jan 2007 21:03:57 -0600,
Jay Belanger <belanger at truman.edu> wrote:

[...]

> Since things work fine here, could you supply more details?  What
> version of maxima-emacs?  Is emacs-snapshot the same as cvs emacs?  What
> exactly did you type in?  If you work with a newly started emacs, start
> maxima (M-x maxima, say) and type in a simple command (2+2; RET, for
> example), do you have the problem?

Sorry for the delay, I couldn't get back earlier.  Yes, emacs-snapshot is
the same as cvs emacs.  Basically, _any_ expression I type in at the first
maxima prompt (or send to the process from a script file) causes the
problem.

I think I may have isolated the issue, and it's related to this code in my
~/.emacs:


(require 'ansi-color)
(setq ansi-color-for-comint-mode t)


Checking further:

,-----[ C-h v ansi-color-for-comint-mode RET ]
| ansi-color-for-comint-mode is a variable defined in `ansi-color.el'.
| Its value is t
| 
| 
| Documentation:
| Determines what to do with comint output.
| If nil, do nothing.
| If the symbol `filter', then filter all SGR control sequences.
| If anything else (such as t), then translate SGR control sequences
| into text-properties.
| 
| In order for this to have any effect, `ansi-color-process-output' must
| be in `comint-output-filter-functions'.
| 
| This can be used to enable colorized ls --color=yes output
| in shell buffers.  You set this variable by calling one of:
| M-x ansi-color-for-comint-mode-on
| M-x ansi-color-for-comint-mode-off
| M-x ansi-color-for-comint-mode-filter
| 
| You can customize this variable.
| 
| [back]
`-----

and:

,-----[ C-h v comint-output-filter-functions RET ]
| comint-output-filter-functions is a variable defined in `comint.el'.
| Its value is 
| (inferior-maxima-output-filter ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt)
| 
| 
| 
| Documentation:
| Functions to call after output is inserted into the buffer.
| One possible function is `comint-postoutput-scroll-to-bottom'.
| These functions get one argument, a string containing the text as originally
| inserted.  Note that this might not be the same as the buffer contents between
| `comint-last-output-start' and the buffer's `process-mark', if other filter
| functions have already modified the buffer.
| 
| See also `comint-preoutput-filter-functions'.
| 
| You can use `add-hook' to add functions to this list
| either globally or locally.
| 
| [back]
`-----

So I wonder if inferior-maxima-output-filter should be after
ansi-color-process-output?


Thanks,

-- 
Seb