From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Subject: Prompting for user name when running block on remote machine Date: Sat, 5 Jul 2014 01:17:20 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3010eaa9bd4a5604fd665301 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3CjK-0003wm-Dy for emacs-orgmode@gnu.org; Fri, 04 Jul 2014 19:17:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3CjJ-0002T5-G9 for emacs-orgmode@gnu.org; Fri, 04 Jul 2014 19:17:22 -0400 Received: from mail-ie0-x230.google.com ([2607:f8b0:4001:c03::230]:52609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3CjJ-0002Sk-B1 for emacs-orgmode@gnu.org; Fri, 04 Jul 2014 19:17:21 -0400 Received: by mail-ie0-f176.google.com with SMTP id at1so1950756iec.35 for ; Fri, 04 Jul 2014 16:17:20 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --20cf3010eaa9bd4a5604fd665301 Content-Type: text/plain; charset=UTF-8 Hi, I was running in to an issue when trying to run a piece of code on a remote machine. I run the following: #+begin_src sh :dir (concat "/ssh:" (read-string "login name: ") "@some.other.place:") echo $USER #+end_src the idea here was that the code block would prompt the user for the login name and proceed to evalue the code on the remote machine. This works as I want it. However now when I try to edit the code in the block and press TAB for indentation the block prompts me again for a "user name:" twice. I'm not sure how to go further from here or why this last thing happens. I'm guessing that the header string is read when the code block tries to determine what code is in there but is there a way to get the behaviour I want without this side effect? Regards Andreas --20cf3010eaa9bd4a5604fd665301 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I was = running in to an issue when trying to run a piece of code on a remote machi= ne.
I run the following:
#+begin_src sh :dir (con= cat "/ssh:" (read-string "login name: ") "@some.ot= her.place:")
=C2=A0=C2=A0=C2=A0=C2=A0 echo $USER
#+end_src

the= idea here was that the code block would prompt the user for the login name= and proceed to evalue the code on the remote machine. This works as I want= it.
However now when I try to edit the code in the block and press TAB fo= r indentation the block prompts me again for a "user name:" twice= .

I'm not sure how to go further from here or why this las= t thing happens. I'm guessing that the header string is read when the c= ode block tries to determine what code is in there but is there a way to ge= t the behaviour I want without this side effect?

Regards
Andreas
--20cf3010eaa9bd4a5604fd665301--