unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4867: 23.1; dired cannot find gunzip with Z; Windows
@ 2009-11-04 16:56 ` Xah Lee
  2009-11-05 19:05   ` bug#4867: marked as done (23.1; dired cannot find gunzip with Z; Windows) Emacs bug Tracking System
  0 siblings, 1 reply; 4+ messages in thread
From: Xah Lee @ 2009-11-04 16:56 UTC (permalink / raw)
  To: bug-gnu-emacs

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/^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#4867: marked as done (23.1; dired cannot find gunzip with Z; Windows)
  2009-11-04 16:56 ` bug#4867: 23.1; dired cannot find gunzip with Z; Windows Xah Lee
@ 2009-11-05 19:05   ` Emacs bug Tracking System
  0 siblings, 0 replies; 4+ messages in thread
From: Emacs bug Tracking System @ 2009-11-05 19:05 UTC (permalink / raw)
  To: Eli Zaretskii

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

Your message dated Thu, 05 Nov 2009 20:55:37 +0200
with message-id <83iqdoby3a.fsf@gnu.org>
and subject line Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows
has caused the Emacs bug report #4867,
regarding 23.1; dired cannot find gunzip with Z; Windows
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4867: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4867
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3479 bytes --]

From: "Xah Lee" <xah@xahlee.org>
To: <bug-gnu-emacs@gnu.org>
Subject: 23.1; dired cannot find gunzip with Z; Windows
Date: Wed, 4 Nov 2009 08:56:09 -0800
Message-ID: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC>

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/[-- Attachment #3: Type: message/rfc822, Size: 2270 bytes --]

From: Eli Zaretskii <eliz@gnu.org>
To: Xah Lee <xah@xahlee.org>, 4867-done@emacsbugs.donarmstrong.com
Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows
Date: Thu, 05 Nov 2009 20:55:37 +0200
Message-ID: <83iqdoby3a.fsf@gnu.org>

> From: "Xah Lee" <xah@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.

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

* bug#4867: 23.1; dired cannot find gunzip with Z; Windows
       [not found] ` <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC>
@ 2009-11-05 20:38   ` Eli Zaretskii
  2009-11-05 21:12     ` Xah Lee
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2009-11-05 20:38 UTC (permalink / raw)
  To: Xah Lee; +Cc: 4867

> From: "Xah Lee" <xah@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.





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

* bug#4867: 23.1; dired cannot find gunzip with Z; Windows
  2009-11-05 20:38   ` bug#4867: 23.1; dired cannot find gunzip with Z; Windows Eli Zaretskii
@ 2009-11-05 21:12     ` Xah Lee
  0 siblings, 0 replies; 4+ messages in thread
From: Xah Lee @ 2009-11-05 21:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 4867

> 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@gnu.org>
To: "Xah Lee" <xah@xahlee.org>
Cc: <4867@emacsbugs.donarmstrong.com>
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@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. 






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

end of thread, other threads:[~2009-11-05 21:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <83iqdoby3a.fsf@gnu.org>
2009-11-04 16:56 ` bug#4867: 23.1; dired cannot find gunzip with Z; Windows Xah Lee
2009-11-05 19:05   ` bug#4867: marked as done (23.1; dired cannot find gunzip with Z; Windows) Emacs bug Tracking System
     [not found] ` <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC>
2009-11-05 20:38   ` bug#4867: 23.1; dired cannot find gunzip with Z; Windows Eli Zaretskii
2009-11-05 21:12     ` Xah Lee

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).