emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [babel] Sh problem when echo'ing input data with ' inside


From: Sébastien Vauban
Subject: [Orgmode] Re: [babel] Sh problem when echo'ing input data with ' inside
Date: Tue, 18 Jan 2011 18:31:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric,

"Eric Schulte" wrote:
>> I asked the question on the Cygwin mailing list, and got an answer from 
>> Tobias
>> Schlottke, telling me to use the 'plain old' syntax (=`...`= instead of
>> =$(...)=):
>>
>> #+begin_src sh
>> data=`cat <<EOF
>> ...
>> EOF
>> `
>> echo "$data"
>> #+end_src
>>
>> and... it indeed works!
>>
>> Can we move to that syntax?
>
> I just made this customizable, after a git pull the following elisp code
> will use that syntax on your system.
>
> #+begin_src emacs-lisp
>   (setq org-babel-sh-var-quote-fmt "`cat <<'BABEL_TABLE'\n%s\nBABEL_TABLE\n`")
> #+end_src

That's, indeed, better than what I had in mind, as it now is customizable...
... and, of course, that does the trick!

Thanks a lot for your prompt fix.

BTW, I would, though, advice to make this the default, as it should be fully
functional under any Linux, and then would be directly usable by any user on
Windows/Cygwin, without having to wonder why sh code blocks don't work the way
they should.

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]