Subject: Re: bug#45951: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 19 Jan 2021 07:12:08 +0100

(Please keep the debbugs address in the CC header -- otherwise the bug
tracker won't receive the message.  Resent to put it into the tracker.)

Richard Sharman <[email-masked]> writes:

>> On Jan 18, 2021, at 8:03 PM, Lars Ingebrigtsen <[email-masked]> wrote:
>> 
>> Richard Sharman <[email-masked]> writes:
>> 
>>> The latter problem can be fixed by calling comint-carriage-motion before
>>> the test is done; the former by looking-at (regexp-quote command)
>>> instead of just at command.
>> 
>> This bit seems to have been fixed in Emacs 28.
>
> Ok, thanks.
>
>> On Jan 18, 2021, at 8:24 PM, Lars Ingebrigtsen <[email-masked]> wrote:
>> 
>> Lars Ingebrigtsen <[email-masked]> writes:
>> 
>>> comint-redirect-send-command-to-process: No prompt found or
>>> ‘comint-prompt-regexp’ not set properly
>>> 
>>> Do you have a recipe, starting from "emacs -Q"?
>> 
>> Oh, we have to `M-x shell' manually first, and then we don't get that
>> error.
>> 
>
> Yes, I think that’s another bug I was going to look into but didn’t.
> After the M-x shell it works.
>
>> But the `M-x example' just infloops for me -- this bit never completes:
>> 
>>      (while (and (null comint-redirect-completed)
>> 		  (accept-process-output process)))
>> 
>
> I saw that once but couldn’t reproduce it. I *think* it happened when
> there was a comint process that had terminated (abnormally perhaps?) I
> tried to see why accept-process-output didn’t return but it was in
> C-code and I didn’t feel up to chasing it.  I think I manually deleted
> the process but I may have restarted emacs; after that I didn’t see it
> happen again.
> …
> I tried running example.el just now from an emacs -Q and apart from
> the “no prompt found” it works fine; I haven’t been able to reproduce
> the problem of accept-process-output not returning.
>
> Richard