emacs-devel
[Top][All Lists]
Advanced

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

Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files


From: Oleh Krehel
Subject: Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files
Date: Wed, 14 Oct 2015 09:56:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Glenn Morris <address@hidden> 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.



reply via email to

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