[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gunzip problem on Windows

From: Sébastien Vauban
Subject: Re: gunzip problem on Windows
Date: Tue, 10 Nov 2009 15:42:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Eli Zaretskii wrote:
>> From: Kevin Rodgers <address@hidden>
>>> It might work to copy gzip.exe into gunzip.exe.

Another solution, from the Net (don't know who anymore):

--8<---------------cut here---------------start------------->8---
      (require 'dired-aux)

      (defun dired-call-process (program discard &rest arguments)
        ;; 09Feb02, sailor overwrite this function because Gnu Emacs cannot
        ;; recognize gunzip is a symbolic link to gzip. Thus, if the program
        ;; is "gunzip", replace it with "gzip" and add an option "-d".

        ;; "Run PROGRAM with output to current buffer unless DISCARD is t.
        ;; Remaining arguments are strings passed as command arguments to
        ;; PROGRAM."
        ;; Look for a handler for default-directory in case it is a
        ;; remote file name.
        (let ((handler
               (find-file-name-handler (directory-file-name default-directory)
          (if handler (apply handler 'dired-call-process
                             program discard arguments)
              (if (string-equal program "gunzip")
                    (setq program "gzip")
                    (add-to-list 'arguments "-d")))
              (apply 'call-process program nil (not discard) nil arguments)))))
--8<---------------cut here---------------end--------------->8---


Sébastien Vauban

reply via email to

[Prev in Thread] Current Thread [Next in Thread]