emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Babel : python generate org source block with an extra comma bef


From: Thorsten Jolitz
Subject: Re: [O] Babel : python generate org source block with an extra comma before * characters
Date: Sun, 13 Jul 2014 16:37:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Roland DONAT <address@hidden> writes:

> Dear Orgmode community,
>
> Thanks in advance to take some time to help me with my problem...
>
> Here is what is making me very sad :
>
> I have a python (python 3 interpreter) source block that I use to generate 
> parts of a report written in Orgmode. Suppose we have this little example :
>
> #+NAME: test
> #+BEGIN_SRC python :results value org :session test
>
> report = """*** header 1
> My pretty report
>
> *** header 2
> Ah ah! With that stuff, I will increase my *productivity*!!!
> """
>
> report
> #+END_SRC
>
> What I get is :
> #+RESULTS: test
> #+BEGIN_SRC org
> ,*** header 1
> My pretty report
>
> ,*** header 2
> Ah ah, with that stuff, I will increase my *productivity*!!!
> #+END_SRC
>
> My question : Why Orgmode adds the comma before the star character???
>
> In the manual, I read some things about comma-escaping in Org source block 
> so my intuition tells me that my problem has something to do with that
> but I
> wasn't able to solve it for now.
>
> My configuration :
> - Org 8.2.5h on Linux Mint 16. 
> - Python 3
>
> Any help would be much appreciated! Thanks.

This is because this function was applied to the results

,----[ C-h f org-escape-code-in-region RET ]
| org-escape-code-in-region is an interactive compiled Lisp function in
| `org-src.el'.
| 
| (org-escape-code-in-region BEG END)
| 
| Escape lines between BEG and END.
| Escaping happens when a line starts with "*", "#+", ",*" or
| ",#+" by appending a comma to it.
| 
| [back]
`----

Not sure how to get rid of this, maybe via :results raw? I'm not aware
of a configuration variable for this, but it surely exists. 

-- 
cheers,
Thorsten




reply via email to

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