Subject: bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Nov 2018 11:23:17 +0200

> From: Mike Kupfer <[email-masked]>
> Date: Tue, 20 Nov 2018 19:39:05 -0800
> 
> The 26.1.90 NEWS file has this (new) entry for Dired:
> 
>   *** The 'Z' command on a directory name compresses all of its files.
>   It produces a compressed '.tar.gz' archive with all the files in the
>   directory and all of its subdirectories.  For symmetry, 'Z' on a
>   '.tar.gz' or a '.tgz' archive extracts all the archived files into a
>   directory whose name is the archive name sans the '.tar.gz' or '.tgz'
>   extension.  (This change was actually made in Emacs 26.1, but was not
>   called out in its NEWS.)
> 
> The description of the unpacking case implies that the user will see the
> described behavior for any .tar.gz or .tgz file.  In reality, 'Z' simply
> unpacks the archive.  The described behavior only happens if the archive
> is structured in a canonical way, e.g., if 'Z' was used to create the
> .tar.gz file.
> 
> The wording should be changed, so as not to mislead the user about what
> 'Z' does.  A user who misunderstands what 'Z' does could lose data due
> to unanticipated overwrite when the archive is unpacked.  (Note that the
> docstring for dired-do-compress says nothing about creating or unpacking
> archive files.)

I don't think I understand.  Are you alluding to the case when the
archive includes absolute file names, or file names that raise above
the directory where the archive lives?  Or do you have some other case
in mind?

> Also, and less important, I got the impression from the discussion on
> emacs-devel that this feature was partially introduced in Emacs 25.
> Wasn't the change in 26.1 just to make .tar.gz and .tgz behave the same?
> I'm not sure it's worth trying to be that precise in the NEWS entry, but
> I thought I'd mention it.

You mean, say that some of the feature was available since Emacs 25?
I don't think it's important, no.