From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: [New Exporter] Parameterized wrapper elements Date: Sat, 9 Mar 2013 11:07:45 -0500 Message-ID: <20130309160745.GA24696@BigDog.local> References: <20130309001710.GB22813@BigDog.local> <87li9xz9g2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEMJN-0002IL-7l for emacs-orgmode@gnu.org; Sat, 09 Mar 2013 11:08:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEMJF-0004Bf-Rs for emacs-orgmode@gnu.org; Sat, 09 Mar 2013 11:07:53 -0500 Received: from [204.62.15.78] (port=38320 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEMJF-0004BE-P0 for emacs-orgmode@gnu.org; Sat, 09 Mar 2013 11:07:45 -0500 Received: from BigDog.local (pool-72-89-40-63.nycmny.fios.verizon.net [72.89.40.63]) by mail.rickster.com (Postfix) with ESMTPS id 0DFDE2214C for ; Sat, 9 Mar 2013 11:07:46 -0500 (EST) Content-Disposition: inline In-Reply-To: <87li9xz9g2.fsf@gmail.com> 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 On Sat, Mar 09, 2013 at 01:46:37AM +0100, Nicolas Goaziou wrote: > Since I don't use html back-end, it would be better to hear from actual > users what they think about it. Sorry, forgot that you are not the keeper of ox-html, just the new exporter at large ;). > Anyway, just a few comments: > > > +(defcustom org-html-divs > > + '(("preamble" "div") > > + ("content" "div") > > + ("postamble" "div")) > > + "Alist of the main divs for HTML export. > Even if this is technically an alist, you don't use it as such, because > you do not treat ID as keys. > > Perhaps something like the following would be better: > > '((preamble "preamble" "div") > (content "content" "div") > (postamble "postamble" "div")) > > One advantage is that you don't have to rely on order of associations. > Another advantage is that you can write: > > (nth 1 (assq 'content org-html-divs)) I agree, but couldn't figure out a way to specify a defcustom alist that requires a fixed set of options. I'm quite new to the defcustom specification format, so maybe there is a way... Given what I see is possible w/ custom alists, the code would have to look like: (nth 1 (or (assq 'content org-html-divs) (assq 'content org-html-default-divs))) Not sure this is any better than the nth nth approach. What do you think? > > + (if (= 1 (org-export-get-relative-level headline info)) > > + (plist-get info :html-container)))))))) > > Shouldn't you close the div when level is different from 1 here? Yes, it's a bug. Missing the else part. Will amend the patch and repost. thanx for finding this. rick