From 043a85d0826eb9a6a1e28792b8a701c74ff18623 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Fri, 22 Jul 2011 16:54:40 +0530 Subject: [PATCH 2/2] org-odt: Check for zip early during export * contrib/lisp/org-odt.el (org-odt-init-outfile): Abort export if zip utility is not available. --- contrib/lisp/org-odt.el | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index c1c5b7f..b7e5a70 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -1226,6 +1226,10 @@ MAY-INLINE-P allows inlining it as an image." (apply 'org-lparse-format-tags tag text prefix suffix args))) (defun org-odt-init-outfile (filename) + (unless (executable-find "zip") + ;; Not at all OSes ship with zip by default + (error "Executable \"zip\" needed for creating OpenDocument files. Aborting.")) + (let* ((outdir (make-temp-file org-export-odt-tmpdir-prefix t)) (mimetype-file (expand-file-name "mimetype" outdir)) (content-file (expand-file-name "content.xml" outdir)) -- 1.7.2.3