From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: We're doing it wrong. [WAS]: Zip utility on Windows for ODT exporter Date: Sat, 6 Apr 2013 13:15:44 -0500 Message-ID: References: <871uao1nzn.fsf@bzg.ath.cx> <87d2u7bkfo.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOXeZ-0008NQ-9D for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 14:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOXeT-0008DJ-NG for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 14:15:50 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:43942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOXeT-0008D1-Ep for emacs-orgmode@gnu.org; Sat, 06 Apr 2013 14:15:45 -0400 Received: by mail-lb0-f179.google.com with SMTP id t1so4665273lbd.10 for ; Sat, 06 Apr 2013 11:15:44 -0700 (PDT) In-Reply-To: <87d2u7bkfo.fsf@bzg.ath.cx> 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: Bastien Cc: "Loyall, David" , emacs-orgmode On Sat, Apr 6, 2013 at 1:09 PM, Bastien wrote: > Hi John, > > John Hendy writes: > >> I guess there's no time like the present for learning some lisp. > > :) > >> *If* I can figure out how to do this, it would be a simple variable to >> set the name of the zip utility. I'd add documentation specific to >> Windows linking to INFO-zip or some other utility, instructions, and >> then to set the variable to "C:/path/to/zip.exe" instead of just >> "zip." > > There are three occurrences of "zip" in ox-odt.el. > > But two of them come with switches (see lines 4101): > > (cmds `(("zip" "-mX0" ,target-name "mimetype") > ("zip" "-rmTq" ,target-name ".")))) > > Two problems: (1) I don't know what these switches do, and > (2) I infer there are specific to zip. > > So you would need to find out if there are necessary and what > equivalent switches are needed for other zip utilities. If they > are not necessary, let's remove them. If these switches are the > same for all zip utilities (we can dream, right?), let's only > have an option `org-odt-zip-executable'. That's what I want, but it has to allow for a specific path to get around having to specifically add the zip utility on Windows to the actual $PATH environment. I'd rather leave the switches along, as then one doesn't have to figure out a bunch of other zip utility stuff. The current documentation requires that one have a *nix-equivalent (wrt syntax) zip utility, hence other mailing list suggestions to use INFO-zip. If we want to go another route, say allowing for 7zip, it would require more more cases to check for the actual zip utility being used. INFO-zip was simple enough, so I think it would be fair to have the user download it, move zip.exe somewhere, and then point to it with the variable. > > If they are pecualiar to zip, then maybe the option should be an > alist of executables to search for, along with formatting strings > for those two occurrences -- something like: > > (setq org-odt-zip-executable > '(("zip" "zip -mX0 %s mimetype" "zip -rmTq %s ."))) > >> *nix users could simply leave the default variable, "zip", or change >> to a direct path as well if they wanted. > > Yes. The problem is with the switches. That would be too simple > otherwise :) Let us know if you can come up with something that > is good enough for you! > I'll keep thinking through it. For now, I got Windows working by simply editing ox-odt directly and replacing zip with zip.exe :) John > -- > Bastien