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?