Browse Source

ox-odt: Read list values in ODT_STYLES_FILE

* lisp/ox-odt.el (org-odt-template): Read value for ODT_STYLES_FILE
  when it is enclosed in round brackets.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00418.html>
Nicolas Goaziou 6 years ago
parent
commit
bfb946c7da
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lisp/ox-odt.el

+ 3 - 0
lisp/ox-odt.el

@@ -1360,6 +1360,9 @@ original parsed data.  INFO is a plist holding export options."
   (let* ((styles-file (plist-get info :odt-styles-file))
   (let* ((styles-file (plist-get info :odt-styles-file))
 	 (styles-file (and (org-string-nw-p styles-file)
 	 (styles-file (and (org-string-nw-p styles-file)
 			   (org-trim styles-file)))
 			   (org-trim styles-file)))
+	 (styles-file (if (string-match-p "\\`(.*)\\'" styles-file)
+			  (ignore-errors (read styles-file))
+			styles-file))
 	 ;; Non-availability of styles.xml is not a critical
 	 ;; Non-availability of styles.xml is not a critical
 	 ;; error. For now, throw an error.
 	 ;; error. For now, throw an error.
 	 (styles-file (or styles-file
 	 (styles-file (or styles-file