From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#36331: 26.2;
 command run using dired-do-async-shell-command cannot take any input
Date: Wed, 18 May 2022 18:44:24 +0300
Message-ID: <83zgjeetgn.fsf@gnu.org>
References: <87mui9ztg8.fsf@JRVLAPTOP.i-did-not-set--mail-host-address--so-tickle-me>
 <87a6bec43g.fsf@gnus.org>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="12873"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: jrvarma@gmail.com, 36331@debbugs.gnu.org
To: Lars Ingebrigtsen <larsi@gnus.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 17:45:43 2022
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nrLrq-0003E4-DX
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 17:45:42 +0200
Original-Received: from localhost ([::1]:43802 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nrLro-0005zG-Of
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 11:45:40 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40800)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nrLrC-0005z3-Hc
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 11:45:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:39379)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nrLrC-0007XO-8G
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 11:45:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nrLrC-0002PP-3u
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 11:45:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 18 May 2022 15:45:02 +0000
Resent-Message-ID: <handler.36331.B36331.16528886849215@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 36331
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
Original-Received: via spool by 36331-submit@debbugs.gnu.org id=B36331.16528886849215
 (code B ref 36331); Wed, 18 May 2022 15:45:02 +0000
Original-Received: (at 36331) by debbugs.gnu.org; 18 May 2022 15:44:44 +0000
Original-Received: from localhost ([127.0.0.1]:33276 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1nrLqt-0002OT-II
 for submit@debbugs.gnu.org; Wed, 18 May 2022 11:44:44 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:47446)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1nrLqr-0002OB-ML
 for 36331@debbugs.gnu.org; Wed, 18 May 2022 11:44:42 -0400
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32784)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>)
 id 1nrLqj-0007Ty-1U; Wed, 18 May 2022 11:44:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=59FyKcw0JQcSvoiEuKluDov5il3tXJktL1oqocbMHd4=; b=dVqpP1TFRG52
 3ermx5UWUwLjxD0VAMhQvbm8sQh2oC1wEh1xuR+3217I7nvXj1pUTulqWMsI7vSyPsoR6d7Ngj1Pg
 BAow+LpW/7Y8b4wXpCd05sFVhmMJQoFDMnvUKneqSFanGGT2XbCkv3jxvDNxLsRlR5ZfXsPaF6SdL
 IbCwgbT8eF4WShEGvHng4KhTSRI8MJbIjD8EI3ksNMQqKbWBs4fQqOe3Y28oRnKyEwFCiEo22LeIY
 wLDKxCOPxEJHS/LcX7EwUDpXyrOSlIEVfp6/744SSeW8c0V4skiOto/MjozZlo6UlFa03rxXHlMpF
 fOdgfFAZbv40eerx5HHLCQ==;
Original-Received: from [87.69.77.57] (port=3014 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>)
 id 1nrLqg-0000mf-Lq; Wed, 18 May 2022 11:44:32 -0400
In-Reply-To: <87a6bec43g.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 
 18 May 2022 16:22:59 +0200)
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:232586
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/232586>

> Cc: 36331@debbugs.gnu.org
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 18 May 2022 16:22:59 +0200
> 
> > First command with "*" in the command line works as expected
> >
> >        cat - * >2.txt
> >
> > With this command, the *Async Shell Command* buffer waits for us to
> > type in whatever lines that we want. When we terminate the input with
> > Control-D (EOF), the command concatenates the inputs lines with 1.txt
> > and writes the result to 2.txt.
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> I can reproduce this, but I think that this works is more by accident
> than by design.  I don't think the `&' command is supposed to allow any
> input to the command -- at least it's not documented to.

Indeed, asynchronous commands cannot rely on being able to read and
write standard streams.  Interactive commands should not be run
asynchronously.