Subject: bug#30059: 25.3; Wrong value for comint-process-echoes will cause comint-send-input to hang

From: Richard Sharman <[email-masked]>
Date: Sat, 6 Feb 2021 17:04:31 -0800

A simple fix is to add a timeout value to the call to accept-process-output.  For example, adding a 1 second timeout not only allows it to recover but also allows Control-g to be honoured.  Because control-g now is not ignored, the value could be increased substantially, say to 10 [seconds].

--- comint.el.orig	2021-02-06 16:55:28.000000000 -0800
+++ comint.el	2021-02-06 16:57:24.000000000 -0800
@@ -1922,7 +1922,7 @@
             ;; Wait for all input to be echoed:
             (while (and (> (+ comint-last-input-end echo-len)
                            (point-max))
-                        (accept-process-output proc)
+                        (accept-process-output proc 1)
                         (zerop
                          (compare-buffer-substrings
                           nil comint-last-input-start