From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sylvain Chouleur Newsgroups: gmane.emacs.bugs Subject: bug#16582: Bug: tramp shell command doesn't read stdin Date: Wed, 5 Feb 2014 15:44:14 +0100 Message-ID: References: <87k3di97pa.fsf@gmx.de> <87eh3k5pdb.fsf@gmx.de> <87zjm6rmi1.fsf@gmx.de> <87r47hsvld.fsf@gmx.de> <87lhxpslji.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134541a9a327004f1a9cbc2 X-Trace: ger.gmane.org 1391611511 2241 80.91.229.3 (5 Feb 2014 14:45:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Feb 2014 14:45:11 +0000 (UTC) Cc: 16582@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 05 15:45:17 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WB3j2-0004aW-W2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Feb 2014 15:45:17 +0100 Original-Received: from localhost ([::1]:59602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB3j2-0007vM-Hz for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Feb 2014 09:45:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB3iu-0007u9-JC for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 09:45:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB3ip-0006wM-Ol for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 09:45:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB3ip-0006v2-LQ for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 09:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WB3io-00076o-H0 for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 09:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sylvain Chouleur Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Feb 2014 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16582 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16582-submit@debbugs.gnu.org id=B16582.139161148027282 (code B ref 16582); Wed, 05 Feb 2014 14:45:02 +0000 Original-Received: (at 16582) by debbugs.gnu.org; 5 Feb 2014 14:44:40 +0000 Original-Received: from localhost ([127.0.0.1]:50322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB3iR-00075x-4l for submit@debbugs.gnu.org; Wed, 05 Feb 2014 09:44:39 -0500 Original-Received: from mail-qa0-f44.google.com ([209.85.216.44]:38834) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB3iN-00075n-1J for 16582@debbugs.gnu.org; Wed, 05 Feb 2014 09:44:35 -0500 Original-Received: by mail-qa0-f44.google.com with SMTP id w5so647092qac.31 for <16582@debbugs.gnu.org>; Wed, 05 Feb 2014 06:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=EQlPGLxEaihI/O6tZEZmTp5oXBGFhWUaYnC8p2I6c4Q=; b=MhCTdyqgfIJdQ0MeehaYKe248cfNSiEZJPqxmWktYPoijYP7IVDtkv+pKY/NY8RGvK ciZ43Q4x+Hwol6pRqRlhbdA+EHTP3UmEBcYShpynKLt5/V5yraISqN/4RNMDZVV4JvFT WNv1erzyHkYRCQfm7bcgEX+3Asm5wwB1WHbuYmuMOo6N34qjZEbgjN5/o9j8wNRnrRkt zhFCm53gAdSTxeywsochHPffKUHHEPS87hWJByy+XS6PfD8mhl3VnHuqARJPcRbzixaQ 1L+wkCgA1VCFOpOfi58MvxMnfO3348AZeJukm7HWbIUdq61wUo478AbZLviNGvnhNc4N ujDA== X-Received: by 10.229.84.198 with SMTP id k6mr3191189qcl.20.1391611474488; Wed, 05 Feb 2014 06:44:34 -0800 (PST) Original-Received: by 10.96.63.134 with HTTP; Wed, 5 Feb 2014 06:44:14 -0800 (PST) In-Reply-To: <87lhxpslji.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84623 Archived-At: --001a1134541a9a327004f1a9cbc2 Content-Type: text/plain; charset=ISO-8859-1 Yes, that is the problem I'm trying to explain since the beginning, I'm please we have finally agreed on what was the issue :) I didn't found any other solution than to call the shell like this: bash With containing the commands. With that type of call, bash keeps reading STDIN for user inputs. That's why I've introduced the process substitution solution 2014-02-05 Michael Albinus : > Sylvain Chouleur writes: > > > Go into a tramp buffer, then execute: > > (async-shell-command "echo -n \"Type something:\"; read line; echo > > line=$line" nil nil) > > > > Your command will print: > > > > Type something:line= > > > > and terminate. > > Well, the problem is that the heredoc construct occupies STDIN, which is > not available for the shell command then. I will check what I can do. > > Best regards, Michael. > --001a1134541a9a327004f1a9cbc2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Yes, that is the problem I'm trying to explain since t= he beginning, I'm please we have finally agreed on what was the issue := )

I didn't found any other solution than to ca= ll the shell like this:
bash <file>

With <= file> containing the commands. With that type of call, bash keeps readin= g STDIN for user inputs. That's why I've introduced the process sub= stitution solution


2014-02= -05 Michael Albinus <michael.albinus@gmx.de>:
Sylvain Chouleur <sylvain.chouleur@gmail.com> writes:

> Go into a tramp buffer, then execute:
> (async-shell-command "echo -n \"Type something:\"; read= line; echo
> line=3D$line" nil nil)
>
> Your command will print:
>
> Type something:line=3D
>
> and terminate.

Well, the problem is that the heredoc construct occupies STDIN, which= is
not available for the shell command then. I will check what I can do.

Best regards, Michael.

--001a1134541a9a327004f1a9cbc2--