From unknown Sat Aug 09 13:16:40 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4867: 23.1; dired cannot find gunzip with Z; Windows Reply-To: "Xah Lee" , 4867@debbugs.gnu.org Resent-From: "Xah Lee" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 04 Nov 2009 17:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4867 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125735378328425 (code B ref -1); Wed, 04 Nov 2009 17:05:05 +0000 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: 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 unknown Sat Aug 09 13:16:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: "Xah Lee" Subject: bug#4867 closed by Eli Zaretskii (Re: bug#4867: 23.1; dired cannot find gunzip with Z; Windows) Message-ID: References: <83iqdoby3a.fsf@gnu.org> <39D68B7CFFBC482AA1F57C354FD0E2AE@xahPC> X-Emacs-PR-Message: they-closed 4867 X-Emacs-PR-Package: emacs Reply-To: 4867@debbugs.gnu.org Date: Thu, 05 Nov 2009 19:05:06 +0000 Content-Type: multipart/mixed; boundary="----------=_1257447906-767-1" This is a multi-part message in MIME format... ------------=_1257447906-767-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #4867: 23.1; dired cannot find gunzip with Z; Windows It has been closed by Eli Zaretskii . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Eli Zaretskii by replying to this email. --=20 4867: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4867 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1257447906-767-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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. ------------=_1257447906-767-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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/ ☄ ------------=_1257447906-767-1-- From unknown Sat Aug 09 13:16:40 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4867: 23.1; dired cannot find gunzip with Z; Windows Reply-To: Eli Zaretskii , 4867@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 05 Nov 2009 20:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4867 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4867-submit@emacsbugs.donarmstrong.com id=B4867.125745355011097 (code B ref 4867); Thu, 05 Nov 2009 20:45:03 +0000 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 In-reply-to: <7DD094C4BE9F42B7965A217C4B33E7FF@xahPC> X-012-Sender: halo1@inter.net.il To: Xah Lee Cc: 4867@debbugs.gnu.org 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 unknown Sat Aug 09 13:16:40 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4867: 23.1; dired cannot find gunzip with Z; Windows Reply-To: "Xah Lee" , 4867@debbugs.gnu.org Resent-From: "Xah Lee" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 05 Nov 2009 21:20:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4867 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4867-submit@emacsbugs.donarmstrong.com id=B4867.125745556915137 (code B ref 4867); Thu, 05 Nov 2009 21:20:06 +0000 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> 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.