From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Babel : python generate org source block with an extra comma before * characters Date: Sun, 13 Jul 2014 16:37:18 +0200 Message-ID: <87ha2lxr35.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6KuM-0006mb-Ux for emacs-orgmode@gnu.org; Sun, 13 Jul 2014 10:37:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6KuF-0007ta-FN for emacs-orgmode@gnu.org; Sun, 13 Jul 2014 10:37:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:45544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6KuF-0007tP-8g for emacs-orgmode@gnu.org; Sun, 13 Jul 2014 10:37:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X6KuE-0007DW-AK for emacs-orgmode@gnu.org; Sun, 13 Jul 2014 16:37:34 +0200 Received: from g231235170.adsl.alicedsl.de ([92.231.235.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2014 16:37:34 +0200 Received: from tjolitz by g231235170.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jul 2014 16:37:34 +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 Roland DONAT 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