From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: bug in orgmode parsing of results Date: Tue, 27 Dec 2016 10:11:55 -0800 Message-ID: References: <38887d7f-355f-65c4-b3f9-ab347780b9c4@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cLwEE-0005Sz-Ks for emacs-orgmode@gnu.org; Tue, 27 Dec 2016 13:12:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cLwEA-0006e1-KY for emacs-orgmode@gnu.org; Tue, 27 Dec 2016 13:12:02 -0500 Received: from iport-bcv3-out.ucsd.edu ([132.239.0.89]:15791) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cLwEA-0006dr-7Z for emacs-orgmode@gnu.org; Tue, 27 Dec 2016 13:11:58 -0500 In-Reply-To: <38887d7f-355f-65c4-b3f9-ab347780b9c4@gmail.com> 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" To: daimrod Cc: emacs-orgmode On Tue, 27 Dec 2016, daimrod wrote: > Hi, > > I've found what I think is a bug in orgmode parsing. > When the following file is parsed : > > * Test > #+BEGIN_SRC emacs-lisp :exports results :results raw drawer > (format "- Test2") > #+END_SRC > > #+RESULTS: > :RESULTS: > - Test2 > :END: > [snip] > > That is, it generates a DRAWER, which seems correct. > > However, when the following file is parsed : > > * Test > #+BEGIN_SRC emacs-lisp :exports results :results raw drawer > (format "* Test2") > #+END_SRC > > #+RESULTS: > :RESULTS: > * Test2 > :END: > [deleted] > That is, it generates a PARAGRAPH which seems incorrect. > > WDYT? > What I think is that you should run org-lint on your document. It will say something like this (but with different line numbers): Line Trust Warning 2 low Forbidden combination in header ":results": raw, drawer 12 low Forbidden combination in header ":results": raw, drawer 17 low Possible incomplete drawer ":RESULTS:" The last one should catch your eye. If you want to generate results that have lines that start with `*' you need to protect them. A good way to do this is to wrap them in a src block or export block like this: #+BEGIN_SRC emacs-lisp :exports results :wrap export latex (format "* Test2") #+END_SRC HTH, Chuck