From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Extending the Org syntax by a custom exporter - how to do it? Date: Sat, 22 Mar 2014 12:23:05 +0100 Message-ID: <87zjkimq92.fsf@gmail.com> References: <20140315111059.00d3b8e0@aga-netbook> <20140315222244.5eee2361@aga-netbook> <874n2ysb30.fsf@gmail.com> <20140317173115.30ee8375@aga-netbook> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRK0g-0007MX-Va for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 07:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRK0b-0000hM-ES for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 07:22:42 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:42025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRK0b-0000hC-6t for emacs-orgmode@gnu.org; Sat, 22 Mar 2014 07:22:37 -0400 Received: by mail-wi0-f177.google.com with SMTP id cc10so1194779wib.16 for ; Sat, 22 Mar 2014 04:22:36 -0700 (PDT) In-Reply-To: <20140317173115.30ee8375@aga-netbook> (Marcin Borkowski's message of "Mon, 17 Mar 2014 17:31:15 +0100") 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: Marcin Borkowski Cc: Org-mode mailing list Hello, Marcin Borkowski writes: > I started to wonder and came to the conclusion that this might be > interesting for my "cloze" idea (with syntax as in one of my previous > messages). However, I can't really understand what is going on here. > It seems to me that the key function is > org-latex--wrap-latex-math-block; it is, however, a bit long and I'm a > bit afraid of studying it (and don't have enough time today for that > anyway). What would you suggest for grokking the idea of > "pseudo-objects"? In particular: > > - How do they get parsed? What portions of the source should I read > to understand that? They are not parsed. You create a new parsed object or element out of thin air, or alter existing markup under certain conditions, and insert it in the parse tree before it gets interpreted by an export back-end. > - Would it be a good idea to instrument one (or more) functions for > edebug to get the idea of what's going on there? Edebug will help only if you have a good mental representation of the parse tree (or at least a function to display it when it is short enough), but it is a valuable tool to understand what happens. Regards, -- Nicolas Goaziou