From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug in new exporter with babel blocks Date: Sat, 20 Apr 2013 21:32:04 +0200 Message-ID: <8761zhkngr.fsf@gmail.com> References: <87obggevdz.fsf@gmail.com> <87ehhc9gfn.fsf@gmail.com> <87liahsfk2.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]:60254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTdW5-0003Bj-B3 for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 15:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTdW4-0002dL-EA for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 15:32:09 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:50076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTdW4-0002dH-7h for emacs-orgmode@gnu.org; Sat, 20 Apr 2013 15:32:08 -0400 Received: by mail-we0-f181.google.com with SMTP id r6so4745566wey.40 for ; Sat, 20 Apr 2013 12:32:07 -0700 (PDT) In-Reply-To: <87liahsfk2.fsf@gmail.com> (Aaron Ecay's message of "Thu, 21 Feb 2013 13:11:09 -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: > 2013ko urtarrilak 23an, Nicolas Goaziou-ek idatzi zuen: >> You needn't. org-exp-blocks functionalities are supported by the new >> exporter out of the box. > > Can you say more about this? I looked for but did not find a > replacement to the org-export-blocks variable (an alist associating > block types with functions to export them). I found it very easy to > hook into the new exporter, but perhaps I missed something? No, you didn't miss anything. I was thinking about `org-special-blocks.el'. The exporter doesn't implement org-exp-blocks functionalities. Though, IIRC, org-exp-blocks was mostly deprecated when Babel was introduced. That's why old ditaa and dot "exp-blocks" were moved to src block languages. > For parsing, yes. But for export I want a way to say =E2=80=9CI don=E2= =80=99t care what > Org thinks the export of this block is. Give me the raw contents, and I > will tell you what the export should be.=E2=80=9D > > This is how the ditaa special-block code used to work; I see that it has > now morphed into a babel language, which makes some kind of sense. I=E2= =80=99m > not sure it does in general. > > My use case is glossed examples for linguistics: my special block > contains three lines, which are a sentence in a foreign language and a > translation. By inserting markup in a way which is easy to automate, > you can get LaTeX to align the words of one language with the words of > the other. I don=E2=80=99t want any org processing of the text of the ex= amples: > it might contain backslashes, stars, etc., all of which should be passed > verbatim to LaTeX. This does not feel like source code, it cannot be > evaluated or tangled, I would not want these blocks to be included in > org-babel-next-src-block, etc. It is data. Source code is for the processing function. Anyway, just store your text in example blocks, and create a src block in any language to do the processing. Then you can call the processing function on all of your example blocks. I suggest to keep the example blocks in a non-exportable section. You can also remove all named example blocks before export, via a hook. Your call. #+begin_src org * Data :no= export: =20=20 #+name: words #+BEGIN_EXAMPLE a b c #+END_EXAMPLE =20=20 #+name:=20 #+BEGIN_SRC emacs-lisp :var x=3Dwords (upcase x) #+END_SRC * Contents #+call: words(:var x=3Dwords) #+end_src Regards, --=20 Nicolas Goaziou