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 13:27:17 +0100 Message-ID: References: <87k3di97pa.fsf@gmx.de> <87eh3k5pdb.fsf@gmx.de> <87zjm6rmi1.fsf@gmx.de> <87r47hsvld.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113940cadaa94704f1a7e133 X-Trace: ger.gmane.org 1391603290 28187 80.91.229.3 (5 Feb 2014 12:28:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Feb 2014 12:28:10 +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 13:28:18 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 1WB1aR-0005vD-LT for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Feb 2014 13:28:15 +0100 Original-Received: from localhost ([::1]:58830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB1aR-0005BG-9h for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Feb 2014 07:28:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB1aK-0005Ax-Ar for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 07:28:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB1aF-00012q-CU for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 07:28:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB1aF-00012l-82 for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 07:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WB1aE-0002V7-Ia for bug-gnu-emacs@gnu.org; Wed, 05 Feb 2014 07:28: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 12:28: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.13916032619578 (code B ref 16582); Wed, 05 Feb 2014 12:28:02 +0000 Original-Received: (at 16582) by debbugs.gnu.org; 5 Feb 2014 12:27:41 +0000 Original-Received: from localhost ([127.0.0.1]:50274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB1Zs-0002UP-HT for submit@debbugs.gnu.org; Wed, 05 Feb 2014 07:27:40 -0500 Original-Received: from mail-qa0-f53.google.com ([209.85.216.53]:50329) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WB1Zq-0002UH-A2 for 16582@debbugs.gnu.org; Wed, 05 Feb 2014 07:27:38 -0500 Original-Received: by mail-qa0-f53.google.com with SMTP id cm18so397019qab.12 for <16582@debbugs.gnu.org>; Wed, 05 Feb 2014 04:27:37 -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=FpB9Y2i6hFNX0T1Gmb1Hjn5aaPSGkedjJnd72jSKkkc=; b=Pe1DXfbIkeNLyTt7hojfXsnX9T0sjY9qqb2t3TigHauzmiLapbhbpsD0jsphG4UCXh NS/XsrYqUdUxlYXCQQ9odqKLtlHUWoxsX4l46FdXfZv36zrXgxpRqsZPcN2BLyLqNNTI NnuDZD1Cq8Bec2FW9BeQ5wgyiLTlJkXwIeGrTMq7dkabZ3o6lhlw0/tDnDdtOvvOa5+X yWlczC7thCRC5UFksu1zgDWJ8lulptcUnDF0cU5vr4QI4YKcXVMwGNl8BpI6KB+DAW93 f+rE/qTtL+hMPxK50LbskPStQMBLqvQvB6BMD1xznmPwEdZ5K+1SRdCrrIrA5YGlHvyU fwzw== X-Received: by 10.140.105.35 with SMTP id b32mr1909526qgf.36.1391603257877; Wed, 05 Feb 2014 04:27:37 -0800 (PST) Original-Received: by 10.96.63.134 with HTTP; Wed, 5 Feb 2014 04:27:17 -0800 (PST) In-Reply-To: <87r47hsvld.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:84618 Archived-At: --001a113940cadaa94704f1a7e133 Content-Type: text/plain; charset=ISO-8859-1 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. It should have printed Type something: waited for your keyboard input and print: line= 2014-02-05 Michael Albinus : > Sylvain Chouleur writes: > > > That said, we still have the original issue of the bz I raised: > > by executing tramp shell commands in this way: > > exec <<'EOF' bash > > > > EOF > > > > we loose the possibility to send user inputs to bash, so commands like > > 'read' will not work. > > That's why I proposed the two approaches to handle your problem (long > > line arguments) and my problem (bash stdin) > > Please give me a concrete Lisp example how you invoke this. Otherwise I > cannot debug; my examples do work. > > Alternatively, tell me what you have entered, starting with "M-x". > > Best regards, Michael. > --001a113940cadaa94704f1a7e133 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Go into a tramp buffer, then execute:
(async-shell-com= mand "echo -n \"Type something:\"; read line; echo line=3D$l= ine" nil nil)

Your command will pri= nt:

Type something:line=3D

=
and terminate.
It should have printed

Type something:

waited for your keyboard input and print:

line=3D<your keyboard input>



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

> That said, we still have the original issue of the bz I raised:
> by executing tramp shell commands in this way:
> exec <<'EOF' bash
> <commands>
> EOF
>
> we loose the possibility to send user inputs to bash, so commands like=
> 'read' will not work.
> That's why I proposed the two approaches to handle your problem (l= ong
> line arguments) and my problem (bash stdin)

Please give me a concrete Lisp example how you invoke this. Otherwise= I
cannot debug; my examples do work.

Alternatively, tell me what you have entered, starting with "M-x"= .

Best regards, Michael.

--001a113940cadaa94704f1a7e133--