From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug in new exporter with babel blocks Date: Wed, 23 Jan 2013 14:28:44 +0100 Message-ID: <87ehhc9gfn.fsf@gmail.com> References: <87obggevdz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty0O9-0007oa-AQ for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 08:29:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty0O0-0004AQ-FM for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 08:29:13 -0500 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:65023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty0O0-0004AE-8X for emacs-orgmode@gnu.org; Wed, 23 Jan 2013 08:29:04 -0500 Received: by mail-we0-f175.google.com with SMTP id z53so2518880wey.34 for ; Wed, 23 Jan 2013 05:29:03 -0800 (PST) In-Reply-To: <87obggevdz.fsf@gmail.com> (Aaron Ecay's message of "Tue, 22 Jan 2013 16:54:32 -0500") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, Aaron Ecay writes: > I=E2=80=99m dealing with a puzzling bug in the new exporter. As backgrou= nd, > I=E2=80=99ve written a custom function to process special-blocks, to repl= icate > 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=E2=80=99m not sure if this is a long-standing problem or not; this is t= he > first time I=E2=80=99ve combined babel with my custom special-blocks code= . I=E2=80=99m > 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=E2=80=99d also be happy to discover another, better way of getting the = raw > text content of the special-block that doesn=E2=80=99t 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, --=20 Nicolas Goaziou