[Top][All Lists]

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

bug#11868: 24.1.50; [python-mode] Blocking call to accept-process-output

From: Stefan Monnier
Subject: bug#11868: 24.1.50; [python-mode] Blocking call to accept-process-output with quit inhibited!! (message buffer)
Date: Tue, 10 Jul 2012 18:58:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> with some trail and error, the following patch is suppressing the warning.

Thank you for your attempt at finding a patch that works.  The problem
is that the warning is there to indicate that there is a "fundamental"
problem, and your patch mostly hides the problem.  Maybe it actually
solves it, but maybe not.
It depends on whether the surrounding code is prepared to deal with
accept-process-output being interrupted by quit.
IOW, we have to either find or create a place where the code is prepared
to handle an interruption by quit.


> diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> index ddedbdb..d6bb724 100644
> --- a/lisp/progmodes/python.el
> +++ b/lisp/progmodes/python.el
> @@ -1609,7 +1609,8 @@ the output."
>                        (setq output-buffer (concat output-buffer string))
>                        "")))))
>      (python-shell-send-string string process msg)
> -    (accept-process-output process)
> +    (with-local-quit
> +      (accept-process-output process))
>      (replace-regexp-in-string
>       (if (> (length python-shell-prompt-output-regexp) 0)
>           (format "\n*%s$\\|^%s\\|\n$"

> Thanks.,
> -- 
> ఎందరో మహానుభావులు అందరికి వందనములు

reply via email to

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