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, 21 Oct 2015 09:57:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> >>     (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.
>> 
>> Doesn't `file-name-nondirectory' already do that?
>
> Is that what %o stands for?  If so, I apologize for not looking
> deeper: relative file names without any leading directories of course
> cannot have any such problems.  (Does that mean that this command will
> only support producing the tarball in the same directory which Dired
> displays?)

Yes, only in the current directory, which makes sense for "Z", which
compresses all marked files to a map of their own names in their own
directory.

>> I also want to add a new command to dired that compresses all marked
>> files into a single named archive: the user gets prompted for a name
>> (through `completing-read'+`read-file-name-internal') and the shell
>> command is resolved from that name. I'd like for it to be bound by
>> default, like "Z". Maybe like this:
>> 
>>     (define-key map "c" 'dired-compress)
>> 
>> The proposed key isn't bound by default. Is that OK?
>
> Sounds OK to me, but maybe wait for a while for others to speak up.

The new `dired-compress' would be able to compress to any directory on
the file system.



reply via email to

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