From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yujie Wen Subject: [Patch] ob-ditaa.el for Cygwin Date: Fri, 12 Jul 2013 13:59:31 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0111b734e1e31704e14a3643 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxWOF-0001h8-5z for emacs-orgmode@gnu.org; Fri, 12 Jul 2013 01:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxWOC-0004hF-Kd for emacs-orgmode@gnu.org; Fri, 12 Jul 2013 01:59:35 -0400 Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:43386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxWOC-0004gv-Eo for emacs-orgmode@gnu.org; Fri, 12 Jul 2013 01:59:32 -0400 Received: by mail-ie0-f180.google.com with SMTP id f4so19451131iea.39 for ; Thu, 11 Jul 2013 22:59:31 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org Mode" --089e0111b734e1e31704e14a3643 Content-Type: multipart/alternative; boundary=089e0111b734e1e31204e14a3641 --089e0111b734e1e31204e14a3641 Content-Type: text/plain; charset=ISO-8859-1 Hi, ob-ditaa.el calls Java VM to generate pictures. Unfortunately, Cygwin doesn't have native Java VM. In order to call the Windows native Java VM properly, all Cygwin paths pointing to ditaa.jar, the temporary input file and the output picture file must be changed to Windows native paths, for example, /home/yujie/ditaa.jar to d:/cygwin/home/yujie/ditaa.jar. Here is a patch that detect whether current Emacs is of Cygwin version and, if so, add `cygpath -w ` to wrap all related pathes. Regards, Yujie --089e0111b734e1e31204e14a3641 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

=A0 ob-ditaa.el calls= Java VM to generate pictures. Unfortunately, Cygwin doesn't have nativ= e Java VM. In order to call the Windows native Java VM properly, all Cygwin= paths pointing to ditaa.jar, the temporary input file and the output pictu= re file must be changed to Windows native paths, for example, /home/yujie/d= itaa.jar to d:/cygwin/home/yujie/ditaa.jar.

=A0 Here is a patch that detect whether current Emacs is of Cygwi= n version and, if so, add `cygpath -w ` to wrap all related pathes.

=
Regards,
Yujie
--089e0111b734e1e31204e14a3641-- --089e0111b734e1e31704e14a3643 Content-Type: application/octet-stream; name="cygwin.patch" Content-Disposition: attachment; filename="cygwin.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hj0z5w6u0 ZGlmZiAtLWdpdCBhL2xpc3Avb2ItZGl0YWEuZWwgYi9saXNwL29iLWRpdGFhLmVsCmluZGV4IGQz ZDc2ZTUuLjYzOTY3ZGUgMTAwNjQ0Ci0tLSBhL2xpc3Avb2ItZGl0YWEuZWwKKysrIGIvbGlzcC9v Yi1kaXRhYS5lbApAQCAtODYsMTMgKzg2LDI5IEBAIFRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIGJ5 IGBvcmctYmFiZWwtZXhlY3V0ZS1zcmMtYmxvY2snLiIKIAkgKGphdmEgKGNkciAoYXNzb2MgOmph dmEgcGFyYW1zKSkpCiAJIChpbi1maWxlIChvcmctYmFiZWwtdGVtcC1maWxlICJkaXRhYS0iKSkK IAkgKGVwcyAoY2RyIChhc3NvYyA6ZXBzIHBhcmFtcykpKQorCSAoamFyLWZpbGUtbmFtZSAoc2hl bGwtcXVvdGUtYXJndW1lbnQKKwkJCSAoZXhwYW5kLWZpbGUtbmFtZQorCQkJICAoaWYgZXBzIG9y Zy1kaXRhYS1lcHMtamFyLXBhdGggb3JnLWRpdGFhLWphci1wYXRoKSkpKQorCSAoZW1hY3MtcCAo c3RyaW5nLW1hdGNoICJjeWd3aW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