From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs 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 Message-ID: <80blf2wcwp.fsf@felesatra.moe> References: <87lfe6x1vv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6777"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 30059@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 10 04:37:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knClV-0001gd-9g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Dec 2020 04:37:13 +0100 Original-Received: from localhost ([::1]:38116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knClU-0006M9-6L for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Dec 2020 22:37:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knClK-0006K1-FT for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 22:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knClK-0003HV-6c for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 22:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knClK-0003Uy-56 for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 22:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Dec 2020 03:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30059 X-GNU-PR-Package: emacs Original-Received: via spool by 30059-submit@debbugs.gnu.org id=B30059.160757137613386 (code B ref 30059); Thu, 10 Dec 2020 03:37:02 +0000 Original-Received: (at 30059) by debbugs.gnu.org; 10 Dec 2020 03:36:16 +0000 Original-Received: from localhost ([127.0.0.1]:36627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knCka-0003Tq-0l for submit@debbugs.gnu.org; Wed, 09 Dec 2020 22:36:16 -0500 Original-Received: from mail-pg1-f177.google.com ([209.85.215.177]:42987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knCkY-0003Tc-6y for 30059@debbugs.gnu.org; Wed, 09 Dec 2020 22:36:14 -0500 Original-Received: by mail-pg1-f177.google.com with SMTP id w16so2905473pga.9 for <30059@debbugs.gnu.org>; Wed, 09 Dec 2020 19:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MfdRtbh7/WmzQqBANjdmPg8EtZK8JwpoeYlkon2GZUo=; b=im4OqLOmwVIaF4j6MktNwETwEtpiRSDJFb5fk0l6mPnZr254D/Gjv4QnorBPPU4iJH trCFe2B/FUrN2HaWstwo4KhXHbsKmVZJFC7RX0BzgcDFomWk5FXID0yFXdGsRbhxaMXl 36ADRRaXBoqKLr2F8BLVzAnjT6sDGcunKDxHZbeN/P/3h7ED9kV22QNDoejWu/9fNeZi IRmDgWnQLFNnkTAEp/1l97uaAAZYTqD5K1XE9Ni52MGUe8YJt3I9bei7/7WT+lCh6f4E JcvFT/1KV1bBEhohgqkC5w0IsFVPrMtH5CFGvf/uRQYxPpZlbZ6Z6v7Zx/2M7zFeRXqZ gY4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MfdRtbh7/WmzQqBANjdmPg8EtZK8JwpoeYlkon2GZUo=; b=oqkWGjQrXWuzdo9Nv+IN+GVP9wlcxwBAJ+BZo38d2u9Zx6Josykv51YPAnXxoCzHdf JxQ0mBJ+MkD66oKqTIPSCK5eG+QpnIblYxrG77D71mBiy5QCpzOuEXLiCiOXimNAPY6s dLjorEaip9LEtWY6nNIFBDQvyK824qfqPx6CnhJCQEWEXZQaZ3jOImT5l7ecvhMUItmz xO4knBX0e+WCJV6FRT/P/r52S+niqucLFphu1fRrbJ+xiBbGDZ1Vtivslq0ob9Hj3BpP h3G3H782YJRwzaKPam+aLrUT7f556Y/+AVjVTqEQyRn6UrW8bUnGuAxSUjc/pLbax3MG XGmA== X-Gm-Message-State: AOAM5305Ts4Kf13+aDBYaaUcSIsbcxixDlnkz9LYFMmoxy9LWfFLUvsq kW1CCPZ1H8pfbs9eacAYoGnWtA== X-Google-Smtp-Source: ABdhPJy/qBWHFPScJ3t1TpQJ1KERZzL4dvumD8Y0qqmjgnNUV+hQEOCMzsdJORFaCdHz6u0MU+jniw== X-Received: by 2002:a63:5418:: with SMTP id i24mr4830171pgb.165.1607571368225; Wed, 09 Dec 2020 19:36:08 -0800 (PST) Original-Received: from localhost ([2600:1700:7270:7d1f:fa59:71ff:fe00:10cc]) by smtp.gmail.com with ESMTPSA id 193sm4276328pfz.36.2020.12.09.19.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 19:36:07 -0800 (PST) In-Reply-To: <87lfe6x1vv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 09 Dec 2020 19:36:36 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195612 Archived-At: Lars Ingebrigtsen writes: > Allen Li 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?