[Top][All Lists]

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

RE: [found the culprit]

From: Drew Adams
Subject: RE: [found the culprit]
Date: Fri, 16 Nov 2018 08:17:00 -0800 (PST)

> > I agree with you about what Z should do, but there is an additional
> > reason.
> >
> > The meaning of Z is to compress or uncompress.  Extracting an archive is
> > a different operation; it is semantically incoherent for Z to extract
> > an archive.
> >
> > If we want a Dired command to extract archives, we should add one.
> > It can handle .tgz files as well as .tar files and other archive types.
> I think this distinction (unpacking vs decompressing) is too subtle.  What
> should we do on formats that support both, like zip?  That is, should Z on a
> zip archive just change its compression mode to store, without extracting the
> files?

Does zip "support both"?  I think that's the
difference: it does not do _each_ of those
things; it has only one action, which combines
both things.

I can't speak for Richard, but my response to
your question would be that if, as in the case
of zip, there is _no distinction_, then we need
not distinguish.  We can just do what we do now:
perform that atomic action.

Call it compress/uncompress or pack/unpack or
compress+pack/unpack+uncompress, or call it
anything you like, for zip.  There's nothing
wrong with letting `Z' perform that one action
and its inverse, alternately.

The problem for tar.gz and .tgz is that there
_is_ a distinction (regardless of how uncommonly
people make use of it): plain tar exists: packed
and uncompressed.

As I said, and as Eli reiterated: let's have a
separate command.  As I said, I am even OK with
letting the presumably more common use case get
the `Z' binding (though that's not what I'd
prefer because of backward compatibility).

But what I don't think is a good idea is to
remove support for uncompressing tar.gz/.tgz
without unpacking.  If necessary and if everyone
wants the combination operation to get the `Z'
binding, then put the presumably less-used
single operation on a different command.

reply via email to

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