emacs-devel
[Top][All Lists]
Advanced

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

RE: [found the culprit] (was: [emacs -q versus empty .emacs file])


From: Drew Adams
Subject: RE: [found the culprit] (was: [emacs -q versus empty .emacs file])
Date: Wed, 14 Nov 2018 09:10:19 -0800 (PST)

> > `Z' should be its own inverse.
> 
> It is.  But there's a problem with "compressing" directories: Emacs
> 26.1 introduced an ambiguity, because 'Z' on a directory produces a
> .tar.gz archive out of its files,

So a directory is a special case, if no one will have
a tar file for a directory (so they only have tar.gz's).

In that case a directory should be the same special case
for inversing.  We should not, I think change the general
case for inversing compression just because in the case
of a directory compression means something different.

> but 'Z' on a .tar.gz file can either
> uncompress to produce a .tar file or unpack all the files
> into a directory.
> 
> > It's fine to have another key that unpacks a tar, or
> > even another key that both uncompresses and unpacks.
> 
> Then someone will complain that 'Z' on a directory is not
> its own inverse.

See above.  Either a directory is a special case or it's
not.  It sounds like it is.

> > BTW, I don't see this change called out in NEWS for
> > Emacs 26.  Is it there and I just missed it?
> 
> It wasn't announced, and the manual wasn't updated to say what 'Z'
> does in a directory.  Shame on us.

;-)

> >  Compress or uncompress marked (or next prefix argument) files.
> >  A prefix argument ARG specifies files to use instead of marked.
> >   An integer means use the next ARG files (previous -ARG, if < 0).
> >   `C-u': Use the current file (whether or not any are marked).
> >   `C-u C-u': Use all files in Dired, except directories.
> >   `C-u C-u C-u': Use all files and directories, except `.' and `..'.
> >   `C-u C-u C-u C-u': Use all files and all directories.
> 
> Is "C-u 0' available?

Depends on what you mean by available.

`C-u 0' for `dired-do-*' commands means act on the next zero
files. In the case of `Z' it (un)compresses no files.  Should
we leave it that way?  I think so.  You can invoke a `dired-do-*'
command from Lisp code, and you might have code that expects
zero to behave as it does now.

I also think it's good for `dired-do-*' commands to share
prefix-arg behavior, other things being equal.

Should a zero numeric prefix arg be redefined for `dired-do-*'
commands generally?  I don't think so, but that could be
something to consider.

But back to square one: Is a directory special, in that no
one will have a tar file for a directory - everyone will
have only a tgz or a tar.gz file?  If it is, then let `Z'
special-case directories.  Is that possible?  To decompress
a tar.gz it would try to decompress to a tar, but if the
result is a directory then the result is, well, a directory
and not a tar.



reply via email to

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