GNU bug report logs -
#4867
23.1; dired cannot find gunzip with Z; Windows
Previous Next
Reported by: "Xah Lee" <xah <at> xahlee.org>
Date: Wed, 4 Nov 2009 17:05:05 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4867 in the body.
You can then email your comments to 4867 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4867
; Package
emacs
.
(Wed, 04 Nov 2009 17:05:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Xah Lee" <xah <at> xahlee.org>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 04 Nov 2009 17:05:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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.
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 that calls gzip -d.
Same problem when starting emacs with -Q.
GNU Emacs 23.1.1 (i386-mingw-nt6.0.6002) of 2009-07-29 on SOFT-MJASON
---------
I'm reporting this as a bug, but tips on solving this on my machine also
would be appreciated. Thank you.
I'm thinking, shouldn't emacs's dired simply look for gzip and call it with
gzip -d, instead of looking for the gunzip program? That seems to me simpler
and more reliable.
Xah
∑ http://xahlee.org/
☄
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 05 Nov 2009 19:05:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Xah Lee" <xah <at> xahlee.org>
:
bug acknowledged by developer.
(Thu, 05 Nov 2009 19:05:06 GMT)
Full text and
rfc822 format available.
Message #10 received at 4867-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: "Xah Lee" <xah <at> xahlee.org>
> Date: Wed, 4 Nov 2009 08:56:09 -0800
> Cc:
>
> 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.
No, this error message comes from the OS, not from Emacs. Windows
does not support invocation of Unixy shell scripts, and thus Emacs,
being a native Windows program that uses Windows APIs, cannot run
them.
To make this work, create a Windows batch file unzip.bat which invokes
gzip.exe with the -d switch. Then Emacs will find it and do what you
want.
I'm closing this bug.
Message #11 received at 4867-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Found a solution. Create a file name gunzip.bat, with this content:
@echo off
gzip -d %1
thanks to Eli and others.
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 happen 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/
☄
----- Original Message -----
From: "Eli Zaretskii" <eliz <at> gnu.org>
To: "Xah Lee" <xah <at> xahlee.org>; <4867-done <at> debbugs.gnu.org>
Sent: Thursday, November 05, 2009 10:55 AM
Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows
>> From: "Xah Lee" <xah <at> xahlee.org>
>> Date: Wed, 4 Nov 2009 08:56:09 -0800
>> Cc:
>>
>> 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.
>
> No, this error message comes from the OS, not from Emacs. Windows
> does not support invocation of Unixy shell scripts, and thus Emacs,
> being a native Windows program that uses Windows APIs, cannot run
> them.
>
> To make this work, create a Windows batch file unzip.bat which invokes
> gzip.exe with the -d switch. Then Emacs will find it and do what you
> want.
>
> I'm closing this bug.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4867
; Package
emacs
.
(Thu, 05 Nov 2009 20:45:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 05 Nov 2009 20:45:04 GMT)
Full text and
rfc822 format available.
Message #16 received at 4867 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: "Xah Lee" <xah <at> xahlee.org>
> Date: Thu, 5 Nov 2009 12:25:14 -0800
>
> Found a solution. Create a file name gunzip.bat, with this content:
>
> @echo off
> gzip -d %1
It's better to change the last line to
gzip -d %*
because then you will be able to give more than one argument to this
batch file. E.g., if you want to pass additional switches or unpack
several files.
> 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 happen 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”.
If you try the same with a Windows batch file on GNU/Linux, Emacs will
barf there as well. Emacs behave according to the rules of the host
OS, so you cannot expect it to be able to run alien executables from
some other OS that the host does not recognize as executables and
doesn't know how to run.
Anyway, why do you have gunzip as a shell script? I looked at a
native Windows port and on a GNU/Linux box, and they both have gunzip
as a first-class binary executable program.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4867
; Package
emacs
.
(Thu, 05 Nov 2009 21:20:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Xah Lee" <xah <at> xahlee.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 05 Nov 2009 21:20:06 GMT)
Full text and
rfc822 format available.
Message #21 received at 4867 <at> emacsbugs.donarmstrong.com (full text, mbox):
> It's better to change the last line to
>
> gzip -d %*
>
> because then you will be able to give more than one argument to this
> batch file. E.g., if you want to pass additional switches or unpack
> several files.
Thanks for the tip. I followed your advice on my machine.
> Anyway, why do you have gunzip as a shell script? I looked at a
> native Windows port and on a GNU/Linux box, and they both have gunzip
> as a first-class binary executable program.
Cygwin and msys both use a shell script for some reason.
Xah
----- Original Message -----
From: "Eli Zaretskii" <eliz <at> gnu.org>
To: "Xah Lee" <xah <at> xahlee.org>
Cc: <4867 <at> debbugs.gnu.org>
Sent: Thursday, November 05, 2009 12:38 PM
Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows
>> From: "Xah Lee" <xah <at> xahlee.org>
>> Date: Thu, 5 Nov 2009 12:25:14 -0800
>>
>> Found a solution. Create a file name gunzip.bat, with this content:
>>
>> @echo off
>> gzip -d %1
>
> It's better to change the last line to
>
> gzip -d %*
>
> because then you will be able to give more than one argument to this
> batch file. E.g., if you want to pass additional switches or unpack
> several files.
>
>> 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 happen 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”.
>
> If you try the same with a Windows batch file on GNU/Linux, Emacs will
> barf there as well. Emacs behave according to the rules of the host
> OS, so you cannot expect it to be able to run alien executables from
> some other OS that the host does not recognize as executables and
> doesn't know how to run.
>
> Anyway, why do you have gunzip as a shell script? I looked at a
> native Windows port and on a GNU/Linux box, and they both have gunzip
> as a first-class binary executable program.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 04 Dec 2009 15:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.