From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: derived exporter EXPORT_... options Date: Tue, 26 Nov 2013 18:46:47 +0100 Message-ID: <5294DE87.8070205@mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090208050409010306050802" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMj0-00035X-1k for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 12:47:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlMiq-0007uG-I6 for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 12:47:01 -0500 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:58415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMiq-0007tt-BN for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 12:46:52 -0500 Received: from [10.20.2.71] (port=52258 helo=vmmail1.mpip-mainz.mpg.de) by gate1.mpip-mainz.mpg.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1VlMim-0004D0-0h for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 18:46:48 +0100 Received: from p54a36260.dip0.t-ipconnect.de ([84.163.98.96] helo=[192.168.254.115]) by vmmail1.mpip-mainz.mpg.de with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1VlMi4-0001Ez-FF for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 18:46:04 +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: Org Mode This is a multi-part message in MIME format. --------------090208050409010306050802 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Hi, I'm trying to user EXPORT_... options in subtree export in a derived exporter. Using attached ox-hans exporter and the org file hans.org, I only get "Wurst" as :hans-option, never "Bratwurst", as given under the heading "Two", using both options with subtree export (C-c C-e C-d j h and C-c C-e C-d j H. Do I misunderstand subtree export? Thanks for any help. Best regards Robert -- Robert Klein UNIX Operations, Max Planck-Institut für Polymerforschung Ackermannweg 10 55218 Mainz --------------090208050409010306050802 Content-Type: application/vnd.lotus-organizer; name="hans.org" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="hans.org" IytIQU5TX09QVElPTjogV3Vyc3QKCgoKKiBPbmUKCiogVHdvCiMrRVhQT1JUX0hBTlNfT1BU SU9OOiBCcmF0d3Vyc3QKCiogVGhyZWUK --------------090208050409010306050802 Content-Type: text/x-emacs-lisp; name="ox-hans.el" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ox-hans.el" ;; hans example derived exporter (require 'ox-html) (org-export-define-derived-backend 'hans 'html :menu-entry '(?j "Export w/ HTML-derived hans exporter" ((?h "To temporary buffer (wurst)" org-hans-export-as-wurst) (?H "To temporary buffer (bratwurst)" org-hans-export-as-bratwurst))) :options-alist '((:hans-option "HANS_OPTION" nil nil t))) (defun org-hans-export-as-wurst (&optional a subtreep v b ext-plist) (interactive) (let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist))) (message "HANS-OPTION: %s" (org-element-interpret-data (plist-get doc-env :hans-option))) (message "EXPORT-HANS-OPTION: %s" (org-element-interpret-data (plist-get doc-env :export-hans-option))))) (defun org-hans-export-as-bratwurst (&optional a subtreep v b ext-plist) (interactive) (save-excursion (save-restriction (when subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max))) (let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist))) (message "HANS-OPTION: %s" (org-element-interpret-data (plist-get doc-env :hans-option))) (message "EXPORT-HANS-OPTION: %s" (org-element-interpret-data (plist-get doc-env :export-hans-option))))))) (provide 'ox-hans) --------------090208050409010306050802--