From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [New Exporter] deriving from derived backends? Date: Fri, 15 Mar 2013 21:26:28 +0100 Message-ID: <874ngc5s0b.fsf@gmail.com> References: <20130311183317.GA64866@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGbD5-0007TS-RO for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 16:26:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGbD4-0004vX-GQ for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 16:26:39 -0400 Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]:49243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGbD4-0004vS-AS for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 16:26:38 -0400 Received: by mail-we0-f170.google.com with SMTP id z53so3546274wey.15 for ; Fri, 15 Mar 2013 13:26:37 -0700 (PDT) In-Reply-To: <20130311183317.GA64866@BigDog.local> (Rick Frankel's message of "Mon, 11 Mar 2013 14:33:17 -0400") 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 am trying to derive a backend from another derived backend (i want > to override certain entries in the options-alist), but it does not > seem to work. The menu entries are created, but the in the > second-level derived backend are not being picked up. > > Should this work? Or do i need a different approach? > > here's abbreviated code: > > (org-export-define-derived-backend s5 html > :menu-entry > (?s "Export to S5 HTML Presentation" > ((?H "To temporary buffer" org-s5-export-as-html) > (?h "To file" org-s5-export-to-html) > (?o "To file and open" > (lambda (a s v b) > (if a (org-s5-export-to-html t s v b) > (org-open-file (org-s5-export-to-html nil s v b))))))) > :options-alist > [...] > > > ;; this is the full exporter definition > (org-export-define-derived-backend s5-xoxo s5 > :menu-entry > (?s "Export to S5 HTML Presentation" > ((?X "To temporary buffer (XOXO)" org-s5-export-as-html) > (?x "To file (XOXO)" org-s5-export-to-html) > (?O "To file and open (XOXO)" > (lambda (a s v b) > (if a (org-s5-export-to-html t s v b) > (org-open-file (org-s5-export-to-html nil s v b))))))) > :options-alist > ((:html-container nil nil "li") ;; this is defined in the html backend > ;; this is new to this backend > (:s5-xoxo-root "S5_XOXO_ROOT" nil org-s5-xoxo-root-element))) > > If i use e.g., s-X or s-x in the exporter menu, > in exporter functions, :html-container == "div" (which is set in the > html exporter), and :s5-xoxo-root is nil. You are using the same key: ?s for both back-ends in the menu. You need to use different keys, or install one of them as a sub-menu of the previous one (notice the "1" instead of the description): (org-export-define-derived-backend s5-xoxo s5 :menu-entry (?s 1 ((?X "To temporary buffer (XOXO)" org-s5-export-as-html) (?x "To file (XOXO)" org-s5-export-to-html) (?O "To file and open (XOXO)" (lambda (a s v b) (if a (org-s5-export-to-html t s v b) (org-open-file (org-s5-export-to-html nil s v b))))))) :options-alist ((:html-container nil nil "li") ;; this is defined in the html backend ;; this is new to this backend (:s5-xoxo-root "S5_XOXO_ROOT" nil org-s5-xoxo-root-element))) Regards, -- Nicolas Goaziou