* [BUG] ORG-LIST-END-MARKER when exporting from within a babel block with an exclude or include tag
@ 2012-01-16 5:01 Frozenlock
2012-01-16 15:18 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Frozenlock @ 2012-01-16 5:01 UTC (permalink / raw)
To: emacs-orgmode
Ok, I know this a very specific application. Perhaps it's not even a
bug and I'm using it the wrong way.
Here is a minimum working example:
----------------------------------------------------
#+TITLE: Test org file
#+EXPORT_INCLUDE_TAGS: test2
* 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 :results raw :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))
#+END_SRC
----------------------------------------------------
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:
----------------------------------------------------
Test org file
=============
Author:
Date: 2012-01-15 23:51:47
Table of Contents
=================
1 First heading
2 Second heading
2.1 Now a list
1 First heading :test1:
-----------------------
Testing, 1-2, 1-2.
2 Second heading :test2:
------------------------
Because we can.
2.1 Now a list
===============
- First item
- Second item
ORG-LIST-END-MARKER
----------------------------------------------------
Any idea on how to fix this?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] ORG-LIST-END-MARKER when exporting from within a babel block with an exclude or include tag
2012-01-16 5:01 [BUG] ORG-LIST-END-MARKER when exporting from within a babel block with an exclude or include tag Frozenlock
@ 2012-01-16 15:18 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2012-01-16 15:18 UTC (permalink / raw)
To: Frozenlock; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
>
> 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,
Footnotes:
[1]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: weird.org --]
[-- Type: text/x-org, Size: 448 bytes --]
#+TITLE: Test org file
#+EXPORT_INCLUDE_TAGS: test2
* 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))
#+END_SRC
[-- Attachment #3: Type: text/plain, Size: 48 bytes --]
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-16 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 5:01 [BUG] ORG-LIST-END-MARKER when exporting from within a babel block with an exclude or include tag Frozenlock
2012-01-16 15:18 ` Eric Schulte
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.