From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Johan_W=2E_Kl=C3=BCwer?= Subject: Trouble passing variables into shell blocks on windows Date: Sun, 14 Jun 2015 15:13:04 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ec272fcfb0705187a1944 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z47ik-0004I0-N1 for emacs-orgmode@gnu.org; Sun, 14 Jun 2015 09:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z47ij-0007B4-JZ for emacs-orgmode@gnu.org; Sun, 14 Jun 2015 09:13:06 -0400 Received: from mail-ig0-x234.google.com ([2607:f8b0:4001:c05::234]:34037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z47ij-0007Aq-EF for emacs-orgmode@gnu.org; Sun, 14 Jun 2015 09:13:05 -0400 Received: by igboe5 with SMTP id oe5so12710250igb.1 for ; Sun, 14 Jun 2015 06:13:04 -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 --001a113ec272fcfb0705187a1944 Content-Type: text/plain; charset=UTF-8 I'm having difficulties passing org variables into shell source blocks. This is using Windows 7 and Cygwin with bash shell. For instance, the following #+BEGIN_SRC sh :var x="." ls $x #+END_SRC fails with the error message (as displayed in emacs) ls: cannot access .^M^M : No such file or directory As far as I can see, the first ^M stems from org-babel-sh-var-quote-fmt, and the second from org-babel-expand-body:generic, but I haven't been able to figure out a solution. Any suggestions? --001a113ec272fcfb0705187a1944 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm having difficulties passing org variables into she= ll source blocks. This is using Windows 7 and Cygwin with bash shell. For i= nstance, the following

#+BEGIN_SRC sh :var x=3D".&quo= t;
=C2=A0 ls $x
#+END_SRC

fails with the error mess= age (as displayed in emacs)

=C2=A0 ls: cannot access .^M^M : No such= file or directory


As far as I can see, the first ^M = stems from org-babel-sh-var-quote-fmt, and the second from org-babel-expand= -body:generic, but I haven't been able to figure out a solution. Any su= ggestions?
--001a113ec272fcfb0705187a1944--