unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 30059@debbugs.gnu.org
Subject: bug#30059: 25.3; Wrong value for comint-process-echoes will cause comint-send-input to hang
Date: Wed, 09 Dec 2020 19:36:06 -0800	[thread overview]
Message-ID: <80blf2wcwp.fsf@felesatra.moe> (raw)
In-Reply-To: <87lfe6x1vv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 09 Dec 2020 19:36:36 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Allen Li <vianchielfaura@gmail.com> writes:
>
>> If comint-process-echoes is set to t and the subprocess does not echo
>> input (e.g., Bash depending on configuration), comint-send-input (RET)
>> will hang on a long-running process that does not write output.
>>
>> comint should remove the echoed input line asynchronously.
>
> (This bug report unfortunately got no response at the time.)
>
> This behaviour is still present in Emacs 28...  but is it a bug?  It's a
> setting that's supposed to be used if the shell echoes the inputs, and
> you're not supposed to use it if that's not the case.

Whether it's a bug is arguable, and I would argue that that is beside
the point.

Regardless of whether it is a bug, changing the behavior as I suggested
would improve the overall Emacs experience.  It should not be a
particularly difficult change IIRC from reading the code.  Of course, I
understand if making this change is not high priority.

Additional observation:

Setting comint-process-echoes "works" even if the process does not echo
(IIRC anyway); Emacs checks that the output doesn't match the input and
allows the output to pass unmodified.  It's only when the process
doesn't echo immediately that causes undesirable behavior.

Thus, this also affects the case where the process does echo, but only
after a delay.  Emacs will freeze while waiting for the echoed output,
which is undesirable.  Of course, this situation is likely to be rare as
a process that echoes generally echoes immediately.

>
> Recipe to reproduce:
>
> emacs -Q -f shell
> M-: (setq comint-process-echoes t)
> sleep 10
>
> I'm leaning towards this working as intended.  Any opinions?





  reply	other threads:[~2020-12-10  3:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10  6:16 bug#30059: 25.3; Wrong value for comint-process-echoes will cause comint-send-input to hang Allen Li
2020-12-09 18:36 ` Lars Ingebrigtsen
2020-12-10  3:36   ` Allen Li [this message]
2020-12-11 14:42     ` Lars Ingebrigtsen
2021-02-07  0:35 ` Richard Sharman
2021-08-13 12:55   ` Lars Ingebrigtsen
2021-02-07  1:04 ` Richard Sharman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80blf2wcwp.fsf@felesatra.moe \
    --to=darkfeline@felesatra.moe \
    --cc=30059@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).