all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacsW32 can't find gunzip
@ 2009-07-12  5:14 Xah Lee
  2009-07-12 14:11 ` despen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xah Lee @ 2009-07-12  5:14 UTC (permalink / raw
  To: help-gnu-emacs

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?

I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.
Manually gunning gunzip or gzip -d with shell-command works fine.

GNU Emacs 23.0.94.1 (i386-mingw-nt6.0.6002) of 2009-05-28 on
LENNART-69DE564 (patched)

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
  2009-07-12  5:14 emacsW32 can't find gunzip Xah Lee
@ 2009-07-12 14:11 ` despen
  2009-07-12 19:29 ` Eli Zaretskii
       [not found] ` <mailman.2378.1247426988.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: despen @ 2009-07-12 14:11 UTC (permalink / raw
  To: help-gnu-emacs

Xah Lee <xahlee@gmail.com> writes:

> 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?
>
> I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.
> Manually gunning gunzip or gzip -d with shell-command works fine.

I don't use Windows but see if the solution this user used will work
in your case:

http://groups.google.com/group/comp.emacs/browse_thread/thread/1daa8c36fdae1a70



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
  2009-07-12  5:14 emacsW32 can't find gunzip Xah Lee
  2009-07-12 14:11 ` despen
@ 2009-07-12 19:29 ` Eli Zaretskii
       [not found] ` <mailman.2378.1247426988.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2009-07-12 19:29 UTC (permalink / raw
  To: help-gnu-emacs

> From: Xah Lee <xahlee@gmail.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 mentioned in exec-path (inside
Emacs) or in Path (outside Emacs).

> I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
       [not found] ` <mailman.2378.1247426988.2239.help-gnu-emacs@gnu.org>
@ 2009-07-13  0:58   ` Xah Lee
  2009-07-13  3:58     ` Will Willis
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xah Lee @ 2009-07-13  0:58 UTC (permalink / raw
  To: help-gnu-emacs

On Jul 12, 12:29 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Xah Lee <xah...@gmail.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 mentioned in exec-path (inside
> Emacs) or in Path (outside Emacs).
>
> > I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.
>
> 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=${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
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
  2009-07-13  0:58   ` Xah Lee
@ 2009-07-13  3:58     ` Will Willis
       [not found]     ` <mailman.2399.1247457507.2239.help-gnu-emacs@gnu.org>
  2009-07-13 18:40     ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: Will Willis @ 2009-07-13  3:58 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2557 bytes --]

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 <xahlee@gmail.com> wrote:

> On Jul 12, 12:29 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > > From: Xah Lee <xah...@gmail.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 mentioned in exec-path (inside
> > Emacs) or in Path (outside Emacs).
> >
> > > I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.
> >
> > 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=${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
> ∑ http://xahlee.org/
>
> ☄
>

[-- Attachment #2: Type: text/html, Size: 3462 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
       [not found]     ` <mailman.2399.1247457507.2239.help-gnu-emacs@gnu.org>
@ 2009-07-13  5:19       ` Xah Lee
  0 siblings, 0 replies; 7+ messages in thread
From: Xah Lee @ 2009-07-13  5:19 UTC (permalink / raw
  To: help-gnu-emacs

thanks Will.

The download links at http://unxutils.sourceforge.net/ seems all
broken.

Might try git binaries down the road.

...i've been thinking, perhaps emacs today should simply include all
the unixutil binaries integrated with emacs. That way, saves a lot
trouble. These files are quite small by today's standards.

  Xah
∑ http://xahlee.org/

☄


On Jul 12, 8:58 pm, Will Willis <will.wil...@gmail.com> wrote:
> 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 <xah...@gmail.com> wrote:
> > On Jul 12, 12:29 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > > > From: Xah Lee <xah...@gmail.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 mentioned in exec-path (inside
> > > Emacs) or in Path (outside Emacs).
>
> > > > I have cygwin installed. “which gunzip” shows “/usr/bin/gunzip”.
>
> > > 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=${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
> > ∑http://xahlee.org/
>
> > ☄



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacsW32 can't find gunzip
  2009-07-13  0:58   ` Xah Lee
  2009-07-13  3:58     ` Will Willis
       [not found]     ` <mailman.2399.1247457507.2239.help-gnu-emacs@gnu.org>
@ 2009-07-13 18:40     ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2009-07-13 18:40 UTC (permalink / raw
  To: help-gnu-emacs

> From: Xah Lee <xahlee@gmail.com>
> Date: Sun, 12 Jul 2009 17:58:28 -0700 (PDT)
> 
> 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=${GZIP_BINDIR-'/usr/bin'}:$PATH
> exec gzip -d "$@"

Yuck!  I _hate_ this unportable stuff!

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

You can't, not without significant changes to Dired.  It currently
assumes that the association in dired-compress-file-suffixes is a file
name of a program, not a shell command.

Does it help to copy gzip.exe to gunzip.exe?

If that doesn't work (it depends on how your gzip.exe was compiled),
then perhaps crafting a gunzip.bat batch file that invokes "gzip -d %*"
will work.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-07-13 18:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-12  5:14 emacsW32 can't find gunzip Xah Lee
2009-07-12 14:11 ` despen
2009-07-12 19:29 ` Eli Zaretskii
     [not found] ` <mailman.2378.1247426988.2239.help-gnu-emacs@gnu.org>
2009-07-13  0:58   ` Xah Lee
2009-07-13  3:58     ` Will Willis
     [not found]     ` <mailman.2399.1247457507.2239.help-gnu-emacs@gnu.org>
2009-07-13  5:19       ` Xah Lee
2009-07-13 18:40     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.