From unknown Sat Aug 09 13:08:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4867 <4867@debbugs.gnu.org> To: bug#4867 <4867@debbugs.gnu.org> Subject: Status: 23.1; dired cannot find gunzip with Z; Windows Reply-To: bug#4867 <4867@debbugs.gnu.org> Date: Sat, 09 Aug 2025 20:08:48 +0000 retitle 4867 23.1; dired cannot find gunzip with Z; Windows reassign 4867 emacs submitter 4867 "Xah Lee" severity 4867 normal thanks From xah@xahlee.org Wed Nov 4 08:56:22 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Nov 2009 16:56:23 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.6 required=4.0 tests=AWL,FOURLA,STOX_REPLY_TYPE autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA4GuLqf028422 for ; Wed, 4 Nov 2009 08:56:22 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5j9g-0007E5-P5 for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 11:56:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5j9f-0007CU-1O for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 11:56:19 -0500 Received: from [199.232.76.173] (port=46942 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5j9e-0007CR-V4 for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 11:56:19 -0500 Received: from mout.perfora.net ([74.208.4.195]:59505) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5j9e-00080F-Jt for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 11:56:18 -0500 Received: from xahPC (c-76-102-12-87.hsd1.ca.comcast.net [76.102.12.87]) by mrelay.perfora.net (node=mrus0) with ESMTP (Nemesis) id 0McUXo-1MoCIq14DI-00I6Cm; Wed, 04 Nov 2009 11:56:17 -0500 Message-ID: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> From: "Xah Lee" To: Subject: 23.1; dired cannot find gunzip with Z; Windows Date: Wed, 4 Nov 2009 08:56:09 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-Provags-ID: V01U2FsdGVkX18oZh4cVJxn/K/tVIXxkZUqUmYL/6KbsSghbD+ tlgaU6dBJguFyrHizCDz0UrAhRF2RnVrcoQ9vVL06FT0jjx5Nu xu5lq6eTLdH56/adx7WGQ== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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/ ☄ From eliz@gnu.org Thu Nov 5 10:55:37 2009 Received: (at 4867-done) by emacsbugs.donarmstrong.com; 5 Nov 2009 18:55:38 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout22.012.net.il (mtaout22.012.net.il [80.179.55.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA5ItaYM032467 for <4867-done@emacsbugs.donarmstrong.com>; Thu, 5 Nov 2009 10:55:37 -0800 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KSN00400GJQJS00@a-mtaout22.012.net.il> for 4867-done@emacsbugs.donarmstrong.com; Thu, 05 Nov 2009 20:55:29 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSN00MZMGKGPUC0@a-mtaout22.012.net.il>; Thu, 05 Nov 2009 20:55:29 +0200 (IST) Date: Thu, 05 Nov 2009 20:55:37 +0200 From: Eli Zaretskii Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows In-reply-to: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> X-012-Sender: halo1@inter.net.il To: Xah Lee , 4867-done@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83iqdoby3a.fsf@gnu.org> References: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> > From: "Xah Lee" > 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. From xah@xahlee.org Thu Nov 5 12:25:32 2009 Received: (at 4867-done) by emacsbugs.donarmstrong.com; 5 Nov 2009 20:25:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS,STOX_REPLY_TYPE autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA5KPVSD010124 for <4867-done@emacsbugs.donarmstrong.com>; Thu, 5 Nov 2009 12:25:32 -0800 Received: from xahPC (c-76-102-12-87.hsd1.ca.comcast.net [76.102.12.87]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0LtHhj-1M86Y52SMt-012Jif; Thu, 05 Nov 2009 15:25:25 -0500 Message-ID: <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC> From: "Xah Lee" To: "Eli Zaretskii" , <4867-done@debbugs.gnu.org> References: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> <83iqdoby3a.fsf@gnu.org> In-Reply-To: <83iqdoby3a.fsf@gnu.org> Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows Date: Thu, 5 Nov 2009 12:25:14 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-Provags-ID: V01U2FsdGVkX1+O0ajVVQIJuND5G+79vnfTvyRS+JjfB4GqQki VopRCXNHC99EL6618pWb3GkmzNWZ9fW03pTCFgHdOTsnJsPQa/ sx4mU/ZhXZYi+7aGRTyCw== 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" To: "Xah Lee" ; <4867-done@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" >> 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. From eliz@gnu.org Thu Nov 5 12:39:10 2009 Received: (at 4867) by emacsbugs.donarmstrong.com; 5 Nov 2009 20:39:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, MONOTONE_WORDS_2_15 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout22.012.net.il (mtaout22.012.net.il [80.179.55.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA5Kd85d011086 for <4867@emacsbugs.donarmstrong.com>; Thu, 5 Nov 2009 12:39:09 -0800 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KSN00800KYQ5200@a-mtaout22.012.net.il> for 4867@emacsbugs.donarmstrong.com; Thu, 05 Nov 2009 22:38:26 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.70.37.193]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KSN00874LC0KK00@a-mtaout22.012.net.il>; Thu, 05 Nov 2009 22:38:25 +0200 (IST) Date: Thu, 05 Nov 2009 22:38:33 +0200 From: Eli Zaretskii Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows In-reply-to: <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC> X-012-Sender: halo1@inter.net.il To: Xah Lee Cc: 4867@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83bpjgbtbq.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> <83iqdoby3a.fsf@gnu.org> <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC> > From: "Xah Lee" > 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. From xah@xahlee.org Thu Nov 5 13:12:49 2009 Received: (at 4867) by emacsbugs.donarmstrong.com; 5 Nov 2009 21:12:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS,STOX_REPLY_TYPE autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mout.perfora.net (mout.perfora.net [74.208.4.195]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA5LClYZ015129 for <4867@emacsbugs.donarmstrong.com>; Thu, 5 Nov 2009 13:12:48 -0800 Received: from xahPC (c-76-102-12-87.hsd1.ca.comcast.net [76.102.12.87]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0Mds3B-1MnDZq0Pzp-00QCVx; Thu, 05 Nov 2009 16:12:41 -0500 Message-ID: <664A39468EC9464BAE3CFF2D86FD5E56@xahPC> From: "Xah Lee" To: "Eli Zaretskii" Cc: <4867@debbugs.gnu.org> References: <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> <83iqdoby3a.fsf@gnu.org> <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC> <83bpjgbtbq.fsf@gnu.org> In-Reply-To: <83bpjgbtbq.fsf@gnu.org> Subject: Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows Date: Thu, 5 Nov 2009 13:12:30 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 X-Provags-ID: V01U2FsdGVkX19JMX0zTC1kOcwk4majPpL9PeUGvPjHf13bAma JuVaS5rQhDMPl6qEN4zfGW0CwE1rB99HjkP6dklwLzV6gUDHBr 1K/qqweXQe0T/Bu9mrSnw== > 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" To: "Xah Lee" Cc: <4867@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" >> 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. From unknown Sat Aug 09 13:08:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Dec 2009 15:24:12 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator