[Top][All Lists]

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

Re: [O] [BUG] ORG-LIST-END-MARKER when exporting from within a babel blo

From: Eric Schulte
Subject: Re: [O] [BUG] ORG-LIST-END-MARKER when exporting from within a babel block with an exclude or include tag
Date: Mon, 16 Jan 2012 08:18:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

> If you export this file to PDF (C-c C-e d), babel will evaluate and
> export the file as ascii. However, the ascii file will have the
> undesirable "ORG-LIST-END-MARKER" in it.
> Here is the resulting ascii export:

Well, this certainly is an odd problem.  I can confirm that I recreated
the problem locally on export to .tex and .html, but not to .txt.  I had
to make the following changes to your example [1] before the code block
returned any results on export.

To make things stranger the marker does not appear in the results when
`org-export-blocks-preprocess' is run outside of a recursive export, or
when the code block is evaluated interactively.

I am not familiar enough with the list exporting code to know where to
begin looking into this, but since the buffer does return an elisp
string, one easy (though unclean) solution would be to
`replace-regexp-in-string' to manually strip the "ORG-LIST-END-MARKER"s
from the string.

Hope this helps,

#+TITLE: Test org file

* First heading                                                       :test1:
Testing, 1-2, 1-2.

* Second heading                                                      :test2:
Because we can.

** Now a list
   - First item
   - Second item

#+BEGIN_SRC emacs-lisp :exports results :var buffer-file-name=(buffer-file-name)
(let ((org-export-babel-evaluate nil)); don't evaluate in 'recursive' exports
   (org-export-as-ascii org-export-headline-levels nil nil 'string))

Eric Schulte

reply via email to

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