Quellcode durchsuchen

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>
Nicolas Goaziou vor 9 Jahren
Ursprung
Commit
07ee690dce
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      lisp/ox-odt.el

+ 2 - 1
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