* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
@ 2018-11-21 3:39 Mike Kupfer
2018-11-21 9:23 ` Eli Zaretskii
2018-11-21 18:23 ` Glenn Morris
0 siblings, 2 replies; 14+ messages in thread
From: Mike Kupfer @ 2018-11-21 3:39 UTC (permalink / raw)
To: 33450
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.)
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.
regards,
mike
In GNU Emacs 26.1.90 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
of 2018-11-19 built on alto
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9.6 (stretch)
Recent messages:
Saving file /home/kupfer/.newsrc.eld...
Wrote /home/kupfer/.newsrc.eld
Saving /home/kupfer/.newsrc.eld...done
fetchmail: background fetchmail at 2089 awakened.
Scanning +inbox...done
No messages in +inbox, range (all)
setting password recognizer
Please type y or n: y
View mode: type <help> for help, h for commands, q to quit.
Mark saved where search started
Configured using:
'configure --prefix=/usr/local'
Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM THREADS
Important settings:
value of $LC_TIME: C
value of $LANG: en_US.utf8
locale-coding-system: utf-8-unix
Major mode: MH-Folder
Minor modes in effect:
hl-line-mode: t
shell-dirtrack-mode: t
delete-selection-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow mh-identity mh-letter mh-comp emacsbug gnus-dup vc-hg mh-thread
org-rmail org-mhe org-irc org-info org-gnus nnir org-docview doc-view
jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org-element
avl-tree generator org org-macro org-footnote org-pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src
ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs find-func cal-menu calendar
cal-loaddefs map dired-x view pp misearch multi-isearch sort flow-fill
gnus-bcklg gnus-async gnus-kill cl-extra help-mode gnus-ml disp-table
utf-7 rfc2104 url-http url-gw url-cache url-auth url-handlers nndoc
nnrss mm-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf nndraft nnmh network-stream nsm
starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
nntp gnus-cache mh-alias crm shr-color color url-util url-parse url-vars
qp shr svg xml dom browse-url mm-archive mail-extr mh-mime mh-gnus
mh-show goto-addr thingatpt gnus-cite gnus-art mm-uu mml2015 mm-view
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-win gnus-range gnus nnheader wid-edit
mh-inc hl-line mh-tool-bar mh-seq mh-xface mh-utils mh-folder which-func
imenu mh-scan mh-e mh-compat mh-buffers mh-loaddefs mdk-mail smtpmail
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs sendmail
message rmc puny seq gv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader elec-pair server noutline outline easy-mmode cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
byte-opt bytecomp byte-compile cconv shell pcomplete comint ansi-color
ring xcscope easymenu advice delsel vc cl-loaddefs cl-lib vc-dispatcher
timeclock mdk-hacks time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads inotify dynamic-setting font-render-setting x-toolkit
x multi-tty make-network-process emacs)
Memory information:
((conses 16 404282 45579)
(symbols 48 43548 3)
(miscs 40 632 1235)
(strings 32 108061 13428)
(string-bytes 1 3445889)
(vectors 16 42901)
(vector-slots 8 945970 54386)
(floats 8 496 693)
(intervals 56 19850 1284)
(buffers 992 46))
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
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
2018-11-21 18:23 ` Glenn Morris
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2018-11-21 9:23 UTC (permalink / raw)
To: Mike Kupfer; +Cc: 33450
> From: Mike Kupfer <mkupfer@alum.berkeley.edu>
> 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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 9:23 ` Eli Zaretskii
@ 2018-11-21 14:50 ` Mike Kupfer
2018-11-21 15:13 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Mike Kupfer @ 2018-11-21 14:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 33450
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 14:50 ` Mike Kupfer
@ 2018-11-21 15:13 ` Eli Zaretskii
2018-11-21 15:21 ` Mike Kupfer
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2018-11-21 15:13 UTC (permalink / raw)
To: Mike Kupfer; +Cc: 33450
> From: Mike Kupfer <mkupfer@alum.berkeley.edu>
> cc: 33450@debbugs.gnu.org
> Date: Wed, 21 Nov 2018 06:50:51 -0800
>
> $ 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).
Thanks, I modified the text in the Git repository to make it more
accurate; please take a look.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
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 18:23 ` Glenn Morris
2018-11-21 20:24 ` Glenn Morris
1 sibling, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2018-11-21 18:23 UTC (permalink / raw)
To: Mike Kupfer; +Cc: 33450
Mike Kupfer wrote:
> 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?
Yes, .tar.gz is extracted in eg Emacs 25.3 but tgz isn't.
> (Note that the docstring for dired-do-compress says nothing about
> creating or unpacking archive files.)
Indeed.
One might also ask about tar.xz, tar.bz2, cpio, rar, etc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 18:23 ` Glenn Morris
@ 2018-11-21 20:24 ` Glenn Morris
2018-11-21 22:31 ` Eli Zaretskii
2018-11-22 23:17 ` Richard Stallman
0 siblings, 2 replies; 14+ messages in thread
From: Glenn Morris @ 2018-11-21 20:24 UTC (permalink / raw)
To: Mike Kupfer; +Cc: 33450
Glenn Morris wrote:
> Mike Kupfer wrote:
>
>> 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?
>
> Yes, .tar.gz is extracted in eg Emacs 25.3 but tgz isn't.
And indeed NEWS.25 says "The command 'dired-do-compress', bound to 'Z',
now can compress directories", so NEWS.26 is duplicating that.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 20:24 ` Glenn Morris
@ 2018-11-21 22:31 ` Eli Zaretskii
2018-11-22 18:18 ` Glenn Morris
2018-11-22 23:17 ` Richard Stallman
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2018-11-21 22:31 UTC (permalink / raw)
To: Glenn Morris; +Cc: 33450, mkupfer
> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 21 Nov 2018 15:24:46 -0500
> Cc: 33450@debbugs.gnu.org
>
> And indeed NEWS.25 says "The command 'dired-do-compress', bound to 'Z',
> now can compress directories", so NEWS.26 is duplicating that.
I see no harm in that, as the NEWS.26 text is more complete and
accurate (it talks about decompression as well, for starters).
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 22:31 ` Eli Zaretskii
@ 2018-11-22 18:18 ` Glenn Morris
2018-11-22 19:05 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2018-11-22 18:18 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 33450, mkupfer
Eli Zaretskii wrote:
>> And indeed NEWS.25 says "The command 'dired-do-compress', bound to 'Z',
>> now can compress directories", so NEWS.26 is duplicating that.
>
> I see no harm in that, as the NEWS.26 text is more complete and
> accurate (it talks about decompression as well, for starters).
I find this odd.
95% of the 'Z' NEWS.26 entry is true in Emacs 25.1 (by experiment).
The only thing that's different in 26.1 is the .tgz treatment.
This hardly seems NEWS-worthy.
If you for some reason want to keep the expanded entry in NEWS.26, it
should at least be corrected to say "This change was actually made in
Emacs 25.1, but the NEWS entry was too terse" (or however you want to
justfiy re-visiting it). It is incorrect to say "This change was
actually made in Emacs 26.1".
But I think it would be better to move your description from NEWS to the
doc string.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-22 18:18 ` Glenn Morris
@ 2018-11-22 19:05 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2018-11-22 19:05 UTC (permalink / raw)
To: Glenn Morris; +Cc: 33450, mkupfer
> From: Glenn Morris <rgm@gnu.org>
> Cc: mkupfer@alum.berkeley.edu, 33450@debbugs.gnu.org
> Date: Thu, 22 Nov 2018 13:18:54 -0500
>
> Eli Zaretskii wrote:
>
> >> And indeed NEWS.25 says "The command 'dired-do-compress', bound to 'Z',
> >> now can compress directories", so NEWS.26 is duplicating that.
> >
> > I see no harm in that, as the NEWS.26 text is more complete and
> > accurate (it talks about decompression as well, for starters).
>
> I find this odd.
> 95% of the 'Z' NEWS.26 entry is true in Emacs 25.1 (by experiment).
> The only thing that's different in 26.1 is the .tgz treatment.
> This hardly seems NEWS-worthy.
>
> If you for some reason want to keep the expanded entry in NEWS.26, it
> should at least be corrected to say "This change was actually made in
> Emacs 25.1, but the NEWS entry was too terse" (or however you want to
> justfiy re-visiting it). It is incorrect to say "This change was
> actually made in Emacs 26.1".
>
> But I think it would be better to move your description from NEWS to the
> doc string.
Done.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-21 20:24 ` Glenn Morris
2018-11-21 22:31 ` Eli Zaretskii
@ 2018-11-22 23:17 ` Richard Stallman
2018-11-23 8:37 ` Eli Zaretskii
1 sibling, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2018-11-22 23:17 UTC (permalink / raw)
To: Glenn Morris; +Cc: 33450, mkupfer
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
I think it was a mistake to make Z operate on directories,
and a mistake to think of to creating an archive as "compression".
It would be better to use A as a command to pack and unpack
archives.
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-22 23:17 ` Richard Stallman
@ 2018-11-23 8:37 ` Eli Zaretskii
2018-11-24 0:10 ` Richard Stallman
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2018-11-23 8:37 UTC (permalink / raw)
To: rms; +Cc: 33450, mkupfer
> From: Richard Stallman <rms@gnu.org>
> Date: Thu, 22 Nov 2018 18:17:14 -0500
> Cc: 33450@debbugs.gnu.org, mkupfer@alum.berkeley.edu
>
> I think it was a mistake to make Z operate on directories,
> and a mistake to think of to creating an archive as "compression".
>
> It would be better to use A as a command to pack and unpack
> archives.
I agree, and wrote as much in the discussion. But I'm not going to
work on that any time soon, and meanwhile we should have our
documentation describe what this command does in enough detail for
users not to be surprised.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#33450: 26.1.90; NEWS entry for dired 'Z' is inaccurate
2018-11-23 8:37 ` Eli Zaretskii
@ 2018-11-24 0:10 ` Richard Stallman
0 siblings, 0 replies; 14+ messages in thread
From: Richard Stallman @ 2018-11-24 0:10 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 33450, mkupfer
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> I agree, and wrote as much in the discussion. But I'm not going to
> work on that any time soon, and meanwhile we should have our
> documentation describe what this command does in enough detail for
> users not to be surprised.
I won't dispute that.
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-11-24 0:10 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.