diff options
author | Jambunathan K <kjambunathan@gmail.com> | 2011-09-26 00:15:53 +0530 |
---|---|---|
committer | Jambunathan K <kjambunathan@gmail.com> | 2011-09-26 00:15:53 +0530 |
commit | 32cf8bf731b7d4852b1dbe8b1572206e9c6a9396 (patch) | |
tree | fcae9d30c5a6e001965dc1ff4eba2ca34a27cf3f | |
parent | e9ce64c8bb7d4094c902f581d37741e0b062c6a0 (diff) | |
download | org-mode-32cf8bf731b7d4852b1dbe8b1572206e9c6a9396.tar.gz |
org-odt.el: When zip command fails, log its output as a message
* contrib/lisp/org-odt.el (org-odt-save-as-outfile): When the
zip command fails, spit out the output it generates to
"*Messages*" buffer.
-rw-r--r-- | contrib/lisp/org-odt.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index 792ca2c..4db2dc3 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -1736,14 +1736,18 @@ visually." ;; FIXME: If the file is locked this throws a cryptic error (delete-file target)) - (let ((coding-system-for-write 'no-conversion) exitcode) + (let ((coding-system-for-write 'no-conversion) exitcode err-string) (message "Creating odt file...") (mapc (lambda (cmd) (message "Running %s" (mapconcat 'identity cmd " ")) - (setq exitcode - (apply 'call-process (car cmd) nil nil nil (cdr cmd))) + (setq err-string + (with-output-to-string + (setq exitcode + (apply 'call-process (car cmd) + nil standard-output nil (cdr cmd))))) (or (zerop exitcode) + (ignore (message "%s" err-string)) (error "Unable to create odt file (%S)" exitcode))) cmds)) |