From: Nicolas Goaziou <n.goaziou@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug in new exporter with babel blocks
Date: Wed, 23 Jan 2013 14:28:44 +0100 [thread overview]
Message-ID: <87ehhc9gfn.fsf@gmail.com> (raw)
In-Reply-To: <87obggevdz.fsf@gmail.com> (Aaron Ecay's message of "Tue, 22 Jan 2013 16:54:32 -0500")
Hello,
Aaron Ecay <aaronecay@gmail.com> writes:
> I’m dealing with a puzzling bug in the new exporter. As background,
> I’ve written a custom function to process special-blocks, to replicate
> in the new exporter the functionality of the org-exp-blocks package
> (http://orgmode.org/worg/org-contrib/org-exp-blocks.html).
You needn't. org-exp-blocks functionalities are supported by the new
exporter out of the box.
> Because I need the un-processed text inside the special-block (not
> parsed into an org-elements structure nor escaped for LaTeX special
> characters),
Special blocks are de facto, recursive, much like drawers. Their
contents have to be parsed.
> I’m not sure if this is a long-standing problem or not; this is the
> first time I’ve combined babel with my custom special-blocks code. I’m
> also at a loss of how to debug the internals of org-elements and
> org-export, two complex bits of machinery. I guess the value of the
> :contents-begin and -end properties needs to be fixed in any case.
During export, the buffer being parsed isn't the original buffer,
because of babel block, include keywords and macros expansion. You may
want to have a look at `org-export-as' source code.
Hence, :contents-begin and :contents-end properties do not refer to real
buffer positions in the buffer from which `org-e-latex-special-block' is
called.
> I’d also be happy to discover another, better way of getting the raw
> text content of the special-block that doesn’t succumb to this
> problem.
If you must, you can try:
(org-element-interpret-data (org-element-contents special-block))
from `org-e-latex-special-block'.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-01-23 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 21:54 Bug in new exporter with babel blocks Aaron Ecay
2013-01-23 13:28 ` Nicolas Goaziou [this message]
2013-02-21 18:11 ` Aaron Ecay
2013-04-20 19:32 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ehhc9gfn.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.