Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
gunzip problem on Windows
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Xah Lee  
View profile  
 More options Nov 4, 11:32 am
Newsgroups: gnu.emacs.help, comp.emacs
From: Xah Lee <xah...@gmail.com>
Date: Wed, 4 Nov 2009 08:32:36 -0800 (PST)
Local: Wed, Nov 4 2009 11:32 am
Subject: gunzip problem on Windows
when using emacs on Windows, when in dired, when i press Z on a file
that's gzip compressed, emacs tells me:
'gunzip' is not recognized as an internal or external command,

the problem is apparently that emacs won't recognize the gunzip shell
script without the exe suffix. (the gunzip is in the same dir as
gzip.exe) But if i rename gunzip to gunzip.exe, but Windows complain
that the file is not a exe format.

How to solve this problem?

extra detail:

when i do
(executable-find "gzip")
emacs says
"c:/cygwin/bin/gzip.exe"

and
(executable-find "gunzip")
says
nil.

the gunzip exists at
c:/cygwin/bin/gunzip
which is a shell script.

  Xah
http://xahlee.org/



    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Friedrich Dominicus  
View profile  
 More options Nov 5, 8:22 am
Newsgroups: gnu.emacs.help, comp.emacs
From: Friedrich Dominicus <just-for-news-fr...@q-software-solutions.de>
Date: Thu, 05 Nov 2009 14:22:40 +0100
Local: Thurs, Nov 5 2009 8:22 am
Subject: Re: gunzip problem on Windows

Xah Lee <xah...@gmail.com> writes:
> and
> (executable-find "gunzip")
> says
> nil.

> the gunzip exists at
> c:/cygwin/bin/gunzip
> which is a shell script.

Just change the
dired-compress-file-suffixes
variable. Instead of gunzip you can use gzip -d

Regards
Friedrich

--
Please remove just-for-news- to reply via e-mail.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xah Lee  
View profile  
 More options Nov 5, 2:34 pm
Newsgroups: gnu.emacs.help, comp.emacs
From: Xah Lee <xah...@gmail.com>
Date: Thu, 5 Nov 2009 11:34:49 -0800 (PST)
Local: Thurs, Nov 5 2009 2:34 pm
Subject: Re: gunzip problem on Windows
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/



    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xah Lee  
View profile  
 More options Nov 5, 2:37 pm
Newsgroups: gnu.emacs.help, comp.emacs
From: Xah Lee <xah...@gmail.com>
Date: Thu, 5 Nov 2009 11:37:00 -0800 (PST)
Subject: Re: gunzip problem on Windows
On Nov 5, 5:22 am, Friedrich Dominicus <just-for-news-fr...@q-software-

as far as i know, you can put a program name in dired-compress-file-
suffiexes, but not a program name with a option parameter. How do you
do that?

  Xah
http://xahlee.org/



    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stan  
View profile  
 More options Nov 5, 3:01 pm
Newsgroups: comp.emacs
From: stan <smo...@exis.net>
Date: Thu, 5 Nov 2009 15:01:12 -0500
Local: Thurs, Nov 5 2009 3:01 pm
Subject: Re: gunzip problem on Windows
Xah Lee wrote:

<snip>

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

Are you using the cygwin emacs or a native windows emacs? The above
leads me to suspect you are using a native windows emacs. If so then
you will spend some time twiddling things to help the windows emacs
understand non-native posix style paths. I can't get to my machine
right now so I can't try to reproduce the problem here, but I don't
remember any similar problems with the cygwin emacs (running with X).

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xah Lee  
View profile  
 More options Nov 5, 3:23 pm
Newsgroups: gnu.emacs.help, comp.emacs
From: Xah Lee <xah...@gmail.com>
Date: Thu, 5 Nov 2009 12:23:52 -0800 (PST)
Local: Thurs, Nov 5 2009 3:23 pm
Subject: Re: gunzip problem on Windows
Found a solution. Create a file name gunzip.bat, with this content:

@echo off
gzip -d %1

thanks to Eli and others.

I filed a bug report to FSF on this. #4867. I think this should still
considered a bug though. Considering it as a Windows OS problem isn't
very helpful in solving this. I'm sure if similar problems happens in
linux that's OS issue, people probably will not look at it as “Oh,
it's OS issue, emacs doesn't need to deal with it”.

  Xah
http://xahlee.org/



    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google