summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-09 21:52:10 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-09 21:53:20 +0100
commit07ee690dce504c6082d5ebbe90e6cf4478e07586 (patch)
tree27d43cbf8dff57a74e2c074f3931a79ca4e23b91
parent5d952960293178bdd3ec2cc135dbb0514fdc3693 (diff)
downloadorg-mode-07ee690dce504c6082d5ebbe90e6cf4478e07586.tar.gz
ox-odt: Fix End of file during parsing error
* lisp/ox-odt.el (org-odt-template): Do not call `read' on an empty string. Reported-by: Damien Cassou <damien@cassou.me> <http://permalink.gmane.org/gmane.emacs.orgmode/104947>
-rw-r--r--lisp/ox-odt.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 31b06de..9fce5e7 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1383,7 +1383,8 @@ original parsed data. INFO is a plist holding export options."
;; Copy styles.xml. Also dump htmlfontify styles, if there is any.
;; Write styles file.
(let* ((styles-file (plist-get info :odt-styles-file))
- (styles-file (and styles-file (read (org-trim styles-file))))
+ (styles-file (and (org-string-nw-p styles-file)
+ (read (org-trim styles-file))))
;; Non-availability of styles.xml is not a critical
;; error. For now, throw an error.
(styles-file (or styles-file