Subject: Re: bug#45117: 28.0.50; process-send-string mysteriously exiting non-locally when called from timer

From: Stefan Monnier <[email-masked]>
Date: Thu, 10 Dec 2020 17:48:22 -0500

>>> It was, after all, the status quo after you changed it for 27.1.
>>> Perhaps you had a rationale?
>> I probably did, but ... can't remember and wasn't clever enough to write
>> it in the commit message:-(
>
> Both you and Joao can search your email archive for the message titled
>
>   Re: [Emacs-diffs] scratch/octave-eldoc-fixes 1ad0826 1/2: Prevent
>   accept-process-output with quit inhibited in octave.el05.
>
> sent on 05.12.2018, 01:19 EET (I think that's the timezone).

Hmm... looks like I already purged it.
But based on the title, we could replace the `while-no-input` of eldoc
with `while-no-input` inside octave.el's eldoc function, as in the
patch below.

        Stefan

diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index c313ad1179..9fdeaa946c 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1605,8 +1605,9 @@ octave-eldoc-cache
 
 (defun octave-eldoc-function-signatures (fn)
   (unless (equal fn (car octave-eldoc-cache))
-    (inferior-octave-send-list-and-digest
-     (list (format "print_usage ('%s');\n" fn)))
+    (while-no-input
+      (inferior-octave-send-list-and-digest
+       (list (format "print_usage ('%s');\n" fn))))
     (let (result)
       (dolist (line inferior-octave-output-list)
         ;; The help output has changed a few times in GNU Octave.