From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.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 16:22:59 +0200
Message-ID: <87a6bec43g.fsf@gnus.org>
References: <87mui9ztg8.fsf@JRVLAPTOP.i-did-not-set--mail-host-address--so-tickle-me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="19323"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cc: 36331@debbugs.gnu.org
To: Prof Jayanth R Varma <jrvarma@gmail.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 16:24:15 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 1nrKb0-0004nA-SK
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 16:24:15 +0200
Original-Received: from localhost ([::1]:44996 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 1nrKaz-0003d8-Tf
	for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 10:24:13 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50790)
 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 1nrKao-0003cm-68
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:24:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:39219)
 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 1nrKan-0003Gf-Tc
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:24:01 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nrKan-0004J9-QA
 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 10:24:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 18 May 2022 14:24:01 +0000
Resent-Message-ID: <handler.36331.B36331.165288379516498@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 36331
X-GNU-PR-Package: emacs
Original-Received: via spool by 36331-submit@debbugs.gnu.org id=B36331.165288379516498
 (code B ref 36331); Wed, 18 May 2022 14:24:01 +0000
Original-Received: (at 36331) by debbugs.gnu.org; 18 May 2022 14:23:15 +0000
Original-Received: from localhost ([127.0.0.1]:33113 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1nrKa0-0004Hr-0e
 for submit@debbugs.gnu.org; Wed, 18 May 2022 10:23:15 -0400
Original-Received: from quimby.gnus.org ([95.216.78.240]:40340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@gnus.org>) id 1nrKZx-0004HU-GC
 for 36331@debbugs.gnu.org; Wed, 18 May 2022 10:23:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Gs7rI77YkxeYbq0Yz5+ZYzhl94pe75Od3YICfjyYyqw=; b=fc4jQx0IxT5FAlOuMvkA18eyBz
 depFTWT7ecKOY9YofO4DtFZDzw3TxEnwz3qsB9bC8DhqVo5XHVJKm/rJzcLndyaVD0Imzdr0jdIuq
 Yjr78g6M9ItD5Q7d0m+q9nHgyRxXtzYnCNe4n4HRSmUObeJW1/1oM2DiWb0eewvP5wI0=;
Original-Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@gnus.org>)
 id 1nrKZo-0008EI-Od; Wed, 18 May 2022 16:23:03 +0200
X-Now-Playing: Tricky's _Fall to Pieces_: "Like a Stone"
In-Reply-To: <87mui9ztg8.fsf@JRVLAPTOP.i-did-not-set--mail-host-address--so-tickle-me>
 (Jayanth R. Varma's message of "Sat, 22 Jun 2019 18:07:59 +0530")
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:232575
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/232575>

Prof Jayanth R Varma <jrvarma@gmail.com> writes:

> As a result, the original single command now becomes a background
> command (by the addition of "& wait") and it loses access to standard
> input (it is implicitly run with an empty standard input). If the
> command asks for a confirmation prompt or a password, there is no way
> to provide that input. A simple though somewhat silly way to
> demonstrate the problem is by comparing the following two commands run
> using dired-do-async-shell-command on a single selected file (say
> 1.txt)
>
> 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.

In this example, you can type in stuff in the *Async Shell Command*
buffer, and it'll append to 2.txt what you're typing, which is pretty
eccentric behaviour for this command.

Does anybody know whether this was intended?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no