From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Will Willis Newsgroups: gmane.emacs.help Subject: Re: emacsW32 can't find gunzip Date: Sun, 12 Jul 2009 22:58:17 -0500 Message-ID: <6ee1e6090907122058s71d7be45sb9d0df1de39868ae@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e644b95effa044046e8e5437 X-Trace: ger.gmane.org 1247457543 12832 80.91.229.12 (13 Jul 2009 03:59:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 03:59:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Lee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 13 05:58:56 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQCgo-000297-J6 for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 05:58:55 +0200 Original-Received: from localhost ([127.0.0.1]:42800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQCgn-00080A-Sv for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2009 23:58:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQCgK-0007y8-Ij for help-gnu-emacs@gnu.org; Sun, 12 Jul 2009 23:58:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQCgE-0007xE-W2 for help-gnu-emacs@gnu.org; Sun, 12 Jul 2009 23:58:23 -0400 Original-Received: from [199.232.76.173] (port=48234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQCgE-0007x9-Rg for help-gnu-emacs@gnu.org; Sun, 12 Jul 2009 23:58:18 -0400 Original-Received: from mail-yx0-f200.google.com ([209.85.210.200]:50250) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQCgE-0007Us-7O for help-gnu-emacs@gnu.org; Sun, 12 Jul 2009 23:58:18 -0400 Original-Received: by yxe38 with SMTP id 38so1950834yxe.14 for ; Sun, 12 Jul 2009 20:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0Asd7sbRU4tlquVscAlsRx03dhA1Nlye1DFD7Mh1kYw=; b=KzD6YJvyP2IdtIFl3xqPLWkFdW4tb1ZSz6+9itH0uo/Ojg10oTitx/k3I4GjVtXgBo j6B7BvpIXlOOvbXemOYWIH5lfwGqrinbYCdD5CxHyC5fkb5HyYXA0xDA5UM9WUbZ4KVW 03Mv1wEEPKIPwMLkzozUymPFJVC9+6WvDPnfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Du6GuBKUKSMIMJb/xO23e8QRfLYd/KGWdkCHu3Y6nOFgQYvhYnP05+XD3Bh5RCFzVT AhPYcFCavembLI7SedjrpE/y1UDHv8gzDj4rUVmH/7wwY+ue2YL3SsaY1gmw/hSsqdRk 64bMas7+XDg75aaGQXdxtf0cGnWezmb8HSVbQ= Original-Received: by 10.100.138.7 with SMTP id l7mr6483774and.141.1247457497292; Sun, 12 Jul 2009 20:58:17 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66002 Archived-At: --0016e644b95effa044046e8e5437 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable http://unxutils.sourceforge.net/ is good. Also see the unix binaries that come with the windows version of the Git client. just make sure, as noted above, that where ever you place these binaries, the paths are in you PATH environmental variable. -Will On Sun, Jul 12, 2009 at 7:58 PM, Xah Lee wrote: > On Jul 12, 12:29 pm, Eli Zaretskii wrote: > > > From: Xah Lee > > > Date: Sat, 11 Jul 2009 22:14:33 -0700 (PDT) > > > > > when using emacsW32, in dired, i press Z to uncompress a file, but i > > > got this error: > > > > > apply: Searching for program: no such file or directory, gunzip > > > > > any idea how to fix that? > > > > Make sure gzip.exe is in some directory mentioned in exec-path (inside > > Emacs) or in Path (outside Emacs). > > > > > I have cygwin installed. =E2=80=9Cwhich gunzip=E2=80=9D shows =E2=80= =9C/usr/bin/gunzip=E2=80=9D. > > > > There's no such thing as "/usr/bin/gunzip" on Windows: every absolute > > file name must begin with a drive letter or two slashes. Cygwin hides > > the drive letter (and possibly also a few leading directories) to > > pretend there's a Posix-standard directory tree on your machine, but > > that's an illusion that only Cygwin programs can share. EmacsW32, > > being a native Windows program, cannot. > > > > > Manually gunning gunzip or gzip -d with shell-command works fine. > > > > Probably because your shell is set to the Cygwin shell. But Z invokes > > gzip via call-process, which bypasses the shell, so you need to play > > by the Windows rules. > > thanks a lot. very informative. > > after looking into this with your help, i think my problem is about > emacs unable to execute unix shell script. > > pressing Z in dired to compress a file is no problem. The problem is > with uncompressing. The gunzip is located at > > c:/cygwin/bin/gunzip > > however, it is just a shell script, the content is: > > #!/bin/sh > PATH=3D${GZIP_BINDIR-'/usr/bin'}:$PATH > exec gzip -d "$@" > > So, it seems to me, dired of emacs on Windows is unable execute this > unix shell script as is... > > any suggestion on getting emacs to call gzip -d directly? > > at this point, a easy practical solution is just to define the key Z > in dired and hook it to my own function that parse file name to > determine to compress or uncompress than call shell-command with > gzip... modding dired elisp file seems will take much longer ... > > thanks for any thoughts. > > Xah > =E2=88=91 http://xahlee.org/ > > =E2=98=84 > --0016e644b95effa044046e8e5437 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable http://unxutils.sourceforge.ne= t/ is good. Also see the unix binaries that come with the windows versi= on of the Git client.

just make=C2=A0sure,=C2=A0as=C2=A0= noted=C2=A0above,=C2=A0that=C2=A0where=C2=A0ever=C2=A0you=C2=A0place=C2=A0t= hese=C2=A0binaries,=C2=A0the=C2=A0paths=C2=A0are=C2=A0in=C2=A0you=C2=A0PATH= =C2=A0environmental=C2=A0variable.

-Will

On Sun, Jul 12,= 2009 at 7:58 PM, Xah Lee <xahlee@gmail.com> wrote:
On Jul 12, 12:29 pm, Eli Zaretskii <e...= @gnu.org> wrote:
> > From: Xah Lee <xah...@gmai= l.com>
> > Date: Sat, 11 Jul 2009 22:14:33 -0700 (PDT)
>
> > when using emacsW32, in dired, i press Z = to uncompress a file, but i
> > got this error:
>
> > apply: Searching for program: no such file or directory, gunzip >
> > any idea how to fix that?
>
> Make sure gzip.exe is in some directory mentio= ned in exec-path (inside
> Emacs) or in Path (outside Emacs).
>
> > I have cygwin installed. =E2=80=9Cwhich g= unzip=E2=80=9D shows =E2=80=9C/usr/bin/gunzip=E2=80=9D.
>
> There's no such thing as "/usr/bin/gu= nzip" on Windows: every absolute
> file name must begin with a drive letter or two slashes. =C2=A0Cygwin = hides
> the drive letter (and possibly also a few leading directories) to
> pretend there's a Posix-standard directory tree on your machine, b= ut
> that's an illusion that only Cygwin programs can share. =C2=A0Emac= sW32,
> being a native Windows program, cannot.
>
> > Manually gunning gunzip or gzip -d with s= hell-command works fine.
>
> Probably because your shell is set to the Cygw= in shell. =C2=A0But Z invokes
> gzip via call-process, which bypasses the shell, so you need to play > by the Windows rules.

thanks a lot. very informative.

after looking into this with your help, i think my problem is about
emacs unable to execute unix shell script.

pressing Z in dired to compress a file is no problem. The problem is
with uncompressing. The gunzip is located at

c:/cygwin/bin/gunzip

however, it is just a shell script, the content is:

#!/bin/sh
PATH=3D${GZIP_BINDIR-'/usr/bin'}:$PATH
exec gzip -d "$@"

So, it seems to me, dired of emacs on Windows is unable execute this
unix shell script as is...

any suggestion on getting emacs to call gzip -d directly?

at this point, a easy practical solution is just to define the key Z
in dired and hook it to my own function that parse file name to
determine to compress or uncompress than call shell-command with
gzip... modding dired elisp file seems will take much longer ...

thanks for any thoughts.

=C2=A0Xah
=E2=88=91 http://xahlee.or= g/

=E2=98=84

--0016e644b95effa044046e8e5437--