sebastian.t...@unina.it writes:

> Hello,
>
> I tried the new org-odt exporter in org-mode 7.6 running emacs 23.3
> on Windows 7 with (org-export-as-odt). It stops before generating an
> output with the error message: Searching for program: no such file or
> directory, zip. I guess it is caused by not having a command line
> version of zip in Windows.

The simple patch below tries to check for availability of zip very early
in the export.

>From 043a85d0826eb9a6a1e28792b8a701c74ff18623 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunat...@gmail.com>
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



>
> Is there a way to use org-odt under windows?
>
> Best,
>
> Sebastian
>
>
>

-- 

Reply via email to