emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint-output-filter-functions and multi-line input


From: Stefan Monnier
Subject: Re: comint-output-filter-functions and multi-line input
Date: Mon, 17 Oct 2022 17:27:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko [2022-10-16 08:48:11] wrote:
> Each line is submitted to shell via comint-send-input and, AFAIK, the
> result can be collected using `comint-output-filter-functions'.

`comint-output-filter-functions` is probably run too late.  It's meant
for code to react to changes in the *buffer*, I think (take with
a heavy dose of salt, because I could never really understand the
design).
I suspect that `comint-preoutput-filter-functions` is closer to what you
need/want.


> I expect the `comint-output-filter-functions' to be called on "hello"
> line. However, it does not seem to be the case. Empty "" corresponding
> to "> " PS2 prompts upon sending incomplete script lines are also
> passed.

I suspect that those "" actually aren't called asynchronously in
response to process output (like the "> " prompts), but rather they're
called synchronously directly from `comint-send-input` (not sure why we
do that either).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]