emacs-devel
[Top][All Lists]
Advanced

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

Re: accept-process-output throws


From: JD Smith
Subject: Re: accept-process-output throws
Date: Wed, 24 Nov 2021 00:14:06 -0500


> On Nov 23, 2021, at 10:25 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> Is this in "emacs -Q"?  If so, how did you start the process, and what
> do you have in the process-filter and process-sentinel functions for
> this process?

This is in a customized inferior python mode (a comint-derived mode), running 
iPython as the process.   I discovered the issue with 
`python-shell-send-string-no-output', which adds its own pre-output-filter to 
accumulate and discard process output.  The no-output commands are being sent 
to the process from a post-command hook which kicks off a timer (to gather 
completion and syntax data).  The command results arrive promptly, but when the 
non-local exit occurs, they “escape" the pre-output filtering and show up in 
the buffer.  When this occurs, it is always as a result of the non-local exit 
of `accept-process-output’.  I’ve found the problem gets more severe when the 
PCH-launched timer's delay is very small (<0.1s), i.e. when commands are sent 
in quick succession while typing.

I do not have an emacs -Q demo of this but can look at creating one with the 
stock python-shell-mode.  In the meantime I’ve found that if I bind 
(inhibit-quit t), remove `with-local-quit' and specify a timeout in 
`accept-process-output' (to silence the warning about the blocking call), this 
entirely prevents the non-local exit.  But this I feel is more of a workaround 
than a solution, and I still do not understand the original problem.

Thanks.


reply via email to

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