From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files Date: Wed, 14 Oct 2015 09:56:55 +0200 Message-ID: <87io69opbs.fsf@gmail.com> References: <20151013135354.28594.43074@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444809464 31520 80.91.229.3 (14 Oct 2015 07:57:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Oct 2015 07:57:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 14 09:57:43 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 1ZmGwP-0000C7-48 for ged-emacs-devel@m.gmane.org; Wed, 14 Oct 2015 09:57:41 +0200 Original-Received: from localhost ([::1]:41030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmGwJ-0001Ml-Kc for ged-emacs-devel@m.gmane.org; Wed, 14 Oct 2015 03:57:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmGvX-0000cq-M3 for emacs-devel@gnu.org; Wed, 14 Oct 2015 03:56:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmGvU-0008O3-F9 for emacs-devel@gnu.org; Wed, 14 Oct 2015 03:56:47 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:37547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmGvU-0008Nz-8I; Wed, 14 Oct 2015 03:56:44 -0400 Original-Received: by wijq8 with SMTP id q8so68350123wij.0; Wed, 14 Oct 2015 00:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=OAq5DgqXgEPUQVaU/s6mWqdz+3EQGQupzTuys14DAsc=; b=HivogHjeHZjX/7T9BNTkKPbAsjCRXVlWH1BZzKnlTHtA1TSkvr3BaEzyefKjhG7wou VlQkKXlyYzmHcaoYMeBXNPLrLYfdcD7a0KB7112DCLEkpFVlo6z1ZvOuPGCdPIVfwuY1 mH9Fc6+0ObiU1lGcrO5PZSYs2B7QvAU7pAIMafMNc4cKgc2jCIYvnHPlswgqdwsu9va6 T7xVcCNlMLPKJcSGRL8yG4BLY1ay1v6M9DlQFOjyCuiQf/1JqRpF+z4W+2iud3Q4gPYQ +9vJFu+1IU+2HNgm0Kobw+Zcw8JXewGp6HXqK6dqgo2FqIMEsxuUhFcHWBqBZNivgzXN Vydg== X-Received: by 10.180.8.68 with SMTP id p4mr26564454wia.16.1444809402957; Wed, 14 Oct 2015 00:56:42 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id az6sm18142673wib.12.2015.10.14.00.56.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Oct 2015 00:56:41 -0700 (PDT) In-Reply-To: (Glenn Morris's message of "Tue, 13 Oct 2015 14:28:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 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:191530 Archived-At: Glenn Morris writes: > Oleh Krehel wrote: > >> branch: master >> commit 6d6bf466477b004035a4314886e35214c6f8603b >> (defvar dired-compress-file-suffixes >> - '(("\\.gz\\'" "" "gunzip") >> + '(("\\.tar\\.gz" "" "tar" "-zxvf") > > Missing anchor. Thanks, will fix. >> + ("\\.gz\\'" "" "gunzip") >> ("\\.tgz\\'" ".tar" "gunzip") >> ("\\.Z\\'" "" "uncompress") > > This makes ".tar.gz" and ".tgz" be treated differently. > Isn't that a little odd? > Also: .tar.bz2, .tar.xz, .tar, etc are not handled, only the gzip version. This will be harder to fix, since I've only ever dealt with .tar.gz archives (and .zip sometimes). Could someone provide the relative extraction commands for .tar.bz2, .tar.xz, and .tar? >> - (REGEXP NEW-SUFFIX PROGRAM) >> + (REGEXP NEW-SUFFIX PROGRAM &rest ARGS) > > Using "&rest" will make it difficult to add any future elements beyond > ARGS. Would this be better? ("\\.tar\\.gz\\'" "" "tar" ("-zxvf")) I think the customization for decompression could be completely rewritten to this style: ("\\.tar\\.gz\\'" "tar -zxvf %i") And for compression to this style: ("directory" "tar -czf %o %i") This way, the user will be completely in charge of the compression/decompression command, with no constraints imposed by the customization (i.e. input/output/switches in specific order etc). > Also it seems like this merits a NEWS entry. OK, will add.