[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Trouble passing variables into shell blocks on windows
From: |
Andy Moreton |
Subject: |
Re: [O] Trouble passing variables into shell blocks on windows |
Date: |
Tue, 16 Jun 2015 14:28:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) |
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