all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Kupfer <mkupfer@alum.berkeley.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 33450@debbugs.gnu.org
Subject: bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
Date: Wed, 21 Nov 2018 06:50:51 -0800	[thread overview]
Message-ID: <15706.1542811851@alto> (raw)
In-Reply-To: Your message of "Wed, 21 Nov 2018 11:23:17 +0200." <835zwqiy2i.fsf@gnu.org>

Eli Zaretskii wrote:

> > 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?

The case I have in mind is where the contents of the archive are
unrelated to the name of the archive.  No absolute path or .. is
involved.  For example:

$ ls
foo.tar.gz
$ tar tfz foo.tar.gz 
a
b
c
# uncompress foo.tar.gz with 'Z'
$ ls
a  b  c  foo.tar.gz
$ 

Based on the NEWS entry, a directory "foo" should have been created and
populated with a, b, and c.  But that's not what happens, at least not
on my GNU/Linux system (Debian 9).

mike





  reply	other threads:[~2018-11-21 14:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21  3:39 bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate Mike Kupfer
2018-11-21  9:23 ` Eli Zaretskii
2018-11-21 14:50   ` Mike Kupfer [this message]
2018-11-21 15:13     ` Eli Zaretskii
2018-11-21 15:21       ` Mike Kupfer
2018-11-21 15:39         ` Eli Zaretskii
2018-11-21 18:23 ` Glenn Morris
2018-11-21 20:24   ` Glenn Morris
2018-11-21 22:31     ` Eli Zaretskii
2018-11-22 18:18       ` Glenn Morris
2018-11-22 19:05         ` Eli Zaretskii
2018-11-22 23:17     ` Richard Stallman
2018-11-23  8:37       ` Eli Zaretskii
2018-11-24  0:10         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15706.1542811851@alto \
    --to=mkupfer@alum.berkeley.edu \
    --cc=33450@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.