From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Moreton Subject: Re: Trouble passing variables into shell blocks on windows Date: Tue, 16 Jun 2015 14:28:32 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4qv0-0003j4-LI for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 09:28:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4quu-00005P-NW for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 09:28:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:33795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4quu-00004t-Hh for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 09:28:40 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z4qus-00068b-1M for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 15:28:38 +0200 Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jun 2015 15:28:38 +0200 Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jun 2015 15:28:38 +0200 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 On Sun 14 Jun 2015, Johan W. Klüwer wrote: > 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? I can reproduce this using the native Windows build of emacs. If you are using cygwin tools, consider using a cygwin build of emacs, which will not suffer from this problem. If you running an X server then the cygwin emacs-X11 package is what you need. If you don't want to run an X server then the emacs-w32 package may fit your needs (a cygwin native build of emacs that uses the Windows GUI for display). HTH, AndyM