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

Reply via email to