From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: New html exporter and filters Date: Tue, 05 Mar 2013 09:16:16 +0100 Message-ID: <87y5e2tg6n.fsf@gmail.com> References: <20130304205818.GB89075@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCn30-0000vd-7Q for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 03:16:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCn2y-0008BW-KY for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 03:16:30 -0500 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:37354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCn2y-0008BO-EH for emacs-orgmode@gnu.org; Tue, 05 Mar 2013 03:16:28 -0500 Received: by mail-we0-f175.google.com with SMTP id x8so5687183wey.20 for ; Tue, 05 Mar 2013 00:16:27 -0800 (PST) In-Reply-To: <20130304205818.GB89075@BigDog.local> (Rick Frankel's message of "Mon, 4 Mar 2013 15:58:18 -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, Rick Frankel writes: > I seem to have reached the limit of my emacs-fu. I am looking at > adding XOXO output to the S5 exporter (S5 has built-in support for > XOXO structured documents) and was trying to use an element (headline) > filter to modify the document structure. I am also trying to change > the div id to make them more friendly to the deck.js goto function > (which accumulates and displays the ids as a menu). I'm not sure about what you mean here. > When i look at the `contents' passed to the filter in edebug, i can see > the element properties (level, raw-title, etc) in the output but I > cannot figure out how to access them. You cannot access them. You have access to the full parse tree with (plist-get info :parse-tree), but not to the parsed current headline. Filters only give you access to strings produced by the back-end. Anyway, you still can modify headline div attributes from there. > On the other hand, it would be easier if ox-html were modified so that > org-html-headline uses a variable (or callback) for the format of the > wrapper (currently "
generation. This would add flexibility for inherited backends as well > as allow for more "html5ish" structures (e.g.,
and
> instead of generic ). Wouldn't it be simpler to just fork `org-html-headline' in your back-end in order to replace the divs with something you need? On the other hand, there are a couple of variables providing a way to modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may be even better to collect them in a single defcustom. What do you think? Regards, -- Nicolas Goaziou