From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files Date: Fri, 16 Oct 2015 17:35:58 +0300 Message-ID: <83mvvi6fu9.fsf@gnu.org> References: <20151013135354.28594.43074@vcs.savannah.gnu.org> <87io69opbs.fsf@gmail.com> <83bnc083k3.fsf@gnu.org> <871tcvks7o.fsf@gmail.com> <83si5b54m9.fsf@gnu.org> <87wpunsz6w.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445006185 16487 80.91.229.3 (16 Oct 2015 14:36:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 14:36:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 16 16:36:17 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zn67C-0002hP-A0 for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 16:36:14 +0200 Original-Received: from localhost ([::1]:54076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn67B-0005yp-8K for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 10:36:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn674-0005yO-1m for emacs-devel@gnu.org; Fri, 16 Oct 2015 10:36:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn670-0002b5-18 for emacs-devel@gnu.org; Fri, 16 Oct 2015 10:36:05 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:34772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn66z-0002aj-Ow for emacs-devel@gnu.org; Fri, 16 Oct 2015 10:36:01 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NWB00D00HMBOH00@mtaout26.012.net.il> for emacs-devel@gnu.org; Fri, 16 Oct 2015 17:39:06 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWB008PCI16TP50@mtaout26.012.net.il>; Fri, 16 Oct 2015 17:39:06 +0300 (IDT) In-reply-to: <87wpunsz6w.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191759 Archived-At: > From: Oleh Krehel > Cc: emacs-devel@gnu.org > Date: Fri, 16 Oct 2015 15:47:03 +0200 > > OK, I propose the following entry in `dired-compress-file-suffixes' to > be used when "Z" is pressed on a directory: > > (t ".tar.gz" "tar -c %i | gzip -c9 > %o") If you intend to use redirection at the shell command-line level, the file name that replaces %o will need on MS-Windows to be run through some function that converts forward slashes to backslashes. Otherwise, OK. > >> And this for decompression: > >> > >> gzip -dc example.tar.gz | tar -x > > > > Yes (except that you could use gunzip.) > > So: > > gunzip -dc example.tar.gz | tar -x > > and the corresponding entry in `dired-compress-file-suffixes': > > ("\\.tar\\.gz\\'" "" "gunzip -dc %i | tar -xv") You don't need the 'd' part with gunzip. Also, don't you need to use "tar -xf -"? > Also, what is the difference between gzip and gunzip? The -d switch, see above. > Well, Paul has a weird tar that doesn't understand "-z", so I wonder > what exact command he uses for *.tar.gz. The same as you show above. And there's nothing weird with that: the original Unix Tar didn't support compression, only GNU Tar added that. You are "spoiled" by GNU/Linux which uses GNU tools out of the box. Other kinds of Unix don't.