From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#24876: 26.0.50; alist copied by copy-tree shares structure with original Date: Fri, 04 Nov 2016 08:51:36 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1478275126 21884 195.159.176.226 (4 Nov 2016 15:58:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2016 15:58:46 +0000 (UTC) To: 24876@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 04 16:58:42 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2gse-0001u4-Ii for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2016 16:58:12 +0100 Original-Received: from localhost ([::1]:39533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2gsh-0005jo-Em for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Nov 2016 11:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2gsX-0005iJ-HI for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2gsU-00064O-D0 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:58:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2gsU-000649-7x for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c2gsT-0006Se-VJ for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2016 15:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147827502924691 (code B ref -1); Fri, 04 Nov 2016 15:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Nov 2016 15:57:09 +0000 Original-Received: from localhost ([127.0.0.1]:44734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2grd-0006QA-4S for submit@debbugs.gnu.org; Fri, 04 Nov 2016 11:57:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2grb-0006Pv-6Z for submit@debbugs.gnu.org; Fri, 04 Nov 2016 11:57:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2grU-0005Ce-MB for submit@debbugs.gnu.org; Fri, 04 Nov 2016 11:57:02 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35598) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2grU-0005CS-J4 for submit@debbugs.gnu.org; Fri, 04 Nov 2016 11:57:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2grS-0004R9-P1 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:57:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2grP-00058P-LC for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:56:58 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:56076) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2grP-000569-Bm for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 11:56:55 -0400 Original-Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1c2grM-0001nF-DF for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 16:56:52 +0100 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1c2gr0-0006Zq-I8 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2016 16:56:31 +0100 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125342 Archived-At: copy-tree will recursively copy structures inside of vectors if you pass it a non-nil vecp argument. But it fails to recursively copy structures inside of vectors in alists constructed with dotted pairs. To reproduce, enter the following code into *scratch* and M-x eval-buffer RET: (defun my-copy-tree-bug () (let* ((vec-ab (vector 'a 'b)) (vec-abcd (vector vec-ab (vector 'c 'd))) (vec-alist (list (list 'key vec-abcd))) (vec-alist-copy (copy-tree vec-alist t)) (vec-dotted-alist (list (cons 'key vec-abcd))) (vec-dotted-alist-copy (copy-tree vec-dotted-alist t))) (message "Before:") (message " Original: %S \tCopy: %S" vec-alist vec-alist-copy) (message " Original: %S \tCopy: %S" vec-dotted-alist vec-dotted-alist-copy) (aset vec-ab 0 'foo) (message "After change to original:") (message " Original: %S \tCopy: %S" vec-alist vec-alist-copy) (message " Original: %S \tCopy: %S" vec-dotted-alist vec-dotted-alist-copy))) (my-copy-tree-bug) Result: The copy is independent of the original of the alist constructed with a list but not independent of the original of the alist constructed with a dotted pair. In GNU Emacs 26.0.50.23 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004)) of 2016-11-03 built on rainbow.local Repository revision: 1a2e210db7d85d8cf5f7205a0e4acc49f2ac6e67 Windowing system distributor 'Apple', version 10.3.1404 Recent messages: Original: ((key . [(foo b) (c d)])) Copy: ((key . [(foo b) (c d)])) " Original: ((key . [(foo b) (c d)])) Copy: ((key . [(foo b) (c d)]))" my-copy-tree-bug Before: Original: ((key [[a b] [c d]])) Copy: ((key [[a b] [c d]])) Original: ((key . [[a b] [c d]])) Copy: ((key . [[a b] [c d]])) After change to original: Original: ((key [[foo b] [c d]])) Copy: ((key [[a b] [c d]])) Original: ((key . [[foo b] [c d]])) Copy: ((key . [[foo b] [c d]])) " Original: ((key . [[foo b] [c d]])) Copy: ((key . [[foo b] [c d]]))" Configured using: 'configure --with-ns --disable-ns-self-contained' Configured features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: global-undo-tree-mode: t undo-tree-mode: t diff-auto-refine-mode: t ivy-mode: t global-flycheck-mode: t flycheck-mode: t buffer-face-mode: t yas-global-mode: t yas-minor-mode: t global-company-mode: t company-mode: t pyvenv-mode: t shell-dirtrack-mode: t nameless-mode: t beacon-mode: t rainbow-mode: t column-enforce-mode: t volatile-highlights-mode: t region-state-mode: t ws-butler-global-mode: t ws-butler-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-global-mode: t smartparens-global-strict-mode: t smartparens-strict-mode: t smartparens-mode: t which-key-mode: t modalka-mode: t recentf-mode: t global-auto-revert-mode: t winner-mode: t display-time-mode: t savehist-mode: t override-global-mode: t tooltip-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 size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mailabbrev gmm-utils mailheader tabify add-log log-view pcvs-util vc vc-dispatcher debug origami origami-parsers ielm pp hl-line hideshow imenu-list imenu visual-regexp highlight-symbol disp-table fill-column-indicator undo-tree diff dired-aux expand-region text-mode-expansions cc-mode-expansions python-el-fgallina-expansions er-basic-expansions expand-region-core expand-region-custom dash-at-point cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs eieio-opt speedbar sb-image ezimage dframe tcover-2 testcover edebug comment-dwim-2 vc-git diff-mode colir flx dired dired-loaddefs counsel esh-util swiper ivy delsel ffap flycheck find-func rx face-remap guess-style smtpmail sendmail mail-utils company-capf company-files yasnippet highlight-indentation flymake company help-fns radix-tree elpy pyvenv elpy-refactor smartparens-python python tramp-sh tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec json map grep compile files-x cus-edit virtualenvwrapper gud comint nameless lisp-mnt ace-window avy beacon smex ido deft debbugs soap-client mm-decode mm-bodies mm-encode url-http tls gnutls url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm subr-x puny url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap warnings rng-xsd rng-dt rng-util xsd-regexp xml rainbow-mode ansi-color color s hydra lv column-enforce-mode etags xref project volatile-highlights region-state ws-butler smartparens-config smartparens thingatpt dash which-key modalka quail smart-mode-line-dark-theme smart-mode-line advice rich-minority whiteboard-theme classic-theme recentf tree-widget wid-edit autorevert filenotify winner ring time cus-start cus-load savehist cap-words superword subword use-package diminish bind-key easy-mmode finder-inf edmacro kmacro info cl package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow 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 charscript 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 755982 118671) (symbols 48 47054 1) (miscs 40 3486 3707) (strings 32 120683 149916) (string-bytes 1 3559912) (vectors 16 77911) (vector-slots 8 1922399 95872) (floats 8 1077 1577) (intervals 56 28644 4185) (buffers 976 37))