From cd1d623b8541a370cd72f35a1fd94bd6681de8ce Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 23 Aug 2015 23:50:49 +0200 Subject: [PATCH] ox: Fix inheritance for EXPORT_... properties * lisp/ox.el (org-export--get-subtree-options): (org-export-output-file-name): Let user control inheritance for these properties instead of hard-coding (an inconsistent) behavior. Reported-by: Eric Abrahamsen --- lisp/ox.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 2318cc07e..ac0366249 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -1369,14 +1369,14 @@ for export. Return options as a plist." (let ((plist ;; EXPORT_OPTIONS are parsed in a non-standard way. Take ;; care of them right from the start. - (let ((o (org-entry-get (point) "EXPORT_OPTIONS"))) + (let ((o (org-entry-get (point) "EXPORT_OPTIONS" 'selective))) (and o (org-export--parse-option-keyword o backend)))) ;; Take care of EXPORT_TITLE. If it isn't defined, use ;; headline's title (with no todo keyword, priority cookie or ;; tag) as its fallback value. (cache (list (cons "TITLE" - (or (org-entry-get (point) "EXPORT_TITLE") + (or (org-entry-get (point) "EXPORT_TITLE" 'selective) (progn (looking-at org-complex-heading-regexp) (org-match-string-no-properties 4)))))) ;; Look for both general keywords and back-end specific @@ -1391,7 +1391,8 @@ for export. Return options as a plist." (let ((value (or (cdr (assoc keyword cache)) (let ((v (org-entry-get (point) - (concat "EXPORT_" keyword)))) + (concat "EXPORT_" keyword) + 'selective))) (push (cons keyword v) cache) v)))) (when value (setq plist @@ -5916,7 +5917,7 @@ Return file name as a string." (org-entry-get (save-excursion (ignore-errors (org-back-to-heading) (point))) - "EXPORT_FILE_NAME" t)) + "EXPORT_FILE_NAME" 'selective)) ;; File name may be extracted from buffer's associated ;; file, if any. (and visited-file (file-name-nondirectory visited-file))