all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: gunzip problem on Windows
Date: Thu, 5 Nov 2009 11:34:49 -0800 (PST)	[thread overview]
Message-ID: <3914fd63-03de-4a50-a823-1ee5bac8b9a0@b15g2000yqd.googlegroups.com> (raw)
In-Reply-To: b0333232-d45f-418a-b5df-ccd1fd7a4363@x25g2000prf.googlegroups.com

So far, i haven't been able to get this to work, after taking in all
the suggestions in this thread.

Here's a more full report.

Suppose in dired you have a a file named x.txt.gz, and you move your
cursor to it, then press Z. Emacs will ask you “Compress or uncompress
x.txt.gz? (y or n)”. Answer y should uncompress the file, as the
expected behavior.

I have “gunzip” installed by cygwin at “C:\cygwin\bin”. In emacs, when
you do a “shell-command” then “which gunzip”, the output is “/usr/bin/
gunzip”. This means, emacs can find the file.

The content of that file is:
«
#!/bin/sh
PATH=${GZIP_BINDIR-'/usr/bin'}:$PATH
exec gzip -d "$@"
»

Here's the problem. When i do Z, i get this error:
“apply: Searching for program: no such file or directory, gunzip”.

This is odd and shouldn't happen, since the file is right there and
emacs can find the file by “which gunzip”.

if i rename the file to gunzip.bat, then i do Z in dired on the file,
i get this error:

«
c:\Users\xah\web\xahlee_org\emacs>#!/bin/sh
'#!' is not recognized as an internal or external command,
operable program or batch file.

c:\Users\xah\web\xahlee_org\emacs>PATH=${GZIP_BINDIR-'/usr/bin'}:
$PATH

c:\Users\xah\web\xahlee_org\emacs>exec gzip -d "$@"
'exec' is not recognized as an internal or external command,
operable program or batch file.
Failed to compressc:/Users/xah/web/xahlee_org/emacs/xxxx.txt.gz
»

So, apparantly, emacs can find the program now, but for some mixed
reasons of Windows cmd.exe and cygwin bash and emacs, it seems to run
it as win cmd.exe script and not bash. I suppose this is expected
behavior.

if i rename the file to gunzip.sh, i get this error:

«apply: Searching for program: no such file or directory, gunzip»

the value of my exec-suffixes is
(".exe" ".com" ".bat" ".cmd" ".btm" "")
after changing it to
(".exe" ".com" ".bat" ".cmd" ".btm" ".sh" "")

still same error.

Renaming the file to gunzip.exe wont work because .exe files needs to
be in certain format.

Note that also even if renaming to gunzip.bat or gunzip.sh worked for
this emacs usage situation, that probably isn't a good solution
because it will probably break cygwin, since in unix shell it is
expected to be just “gunzip” not “gunzip.bat” or “gunzip.sh”. So, if
renaming can work for emacs, possibly i'll just create it else where
and put it in a different path...

am i missing something?

does Z in dired on a compressed file work for anyone in Windows?

  Xah
∑ http://xahlee.org/

  parent reply	other threads:[~2009-11-05 19:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 16:32 gunzip problem on Windows Xah Lee
2009-11-04 17:34 ` Andreas Politz
2009-11-04 17:56 ` Eli Zaretskii
2009-11-05 14:26   ` Kevin Rodgers
2009-11-05 19:06     ` Eli Zaretskii
     [not found]     ` <mailman.10136.1257448020.2239.help-gnu-emacs@gnu.org>
2009-11-10 14:42       ` Sébastien Vauban
2018-05-01  9:55         ` byron.cordova.mora
     [not found]   ` <mailman.10126.1257431414.2239.help-gnu-emacs@gnu.org>
2009-11-05 19:38     ` Xah Lee
2009-11-05 13:22 ` Friedrich Dominicus
2009-11-05 19:37   ` Xah Lee
2009-11-05 19:34 ` Xah Lee [this message]
2009-11-05 20:23   ` Xah Lee
2009-11-06  8:28     ` Eli Zaretskii
     [not found] ` <mailman.10068.1257357458.2239.help-gnu-emacs@gnu.org>
2009-11-05 19:35   ` Xah Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3914fd63-03de-4a50-a823-1ee5bac8b9a0@b15g2000yqd.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.