GNU bug report logs - #7083
Why is `copy-tree's symbol-plist carrying side-effect-free error-free?

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Wed, 22 Sep 2010 06:30:02 UTC

Severity: normal

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 7083 <at> debbugs.gnu.org (full text, mbox):

From: David De La Harpe Golden <david <at> harpegolden.net>
To: MON KEY <monkey <at> sandpframing.com>
Cc: 7083 <at> debbugs.gnu.org, 7088 <at> debbugs.gnu.org
Subject: Re: bug#7088: `copy-tree' of a vector copy sharing structure.with
	original
Date: Thu, 23 Sep 2010 21:41:30 +0100
On 23/09/10 06:28, MON KEY wrote:
> (let ((orig [[a b] [c d] [e f] [g h]])
>        new-cp)
>    (setq new-cp (copy-tree orig))

Some people would have at least considered a quick C-h f copy-tree
before filing a bug?

You're missing the VECP arg to emacs lisp copy-tree.

Without that, emacs lisp copy-tree is, much like common lisp copy-tree, 
documented to copy trees of _conses_.   Conses do of course look pretty 
like 2 element vectors, but they are a separate datatype in emacs lisp.

ELISP> (let ((orig [[a b] [c d] [e f] [g h]])
      new-cp)
  (setq new-cp (copy-tree orig t))
  (string-equal (aref (prog1 orig
                        (aset new-cp 0 "bubba"))
                      0)
                "bubba"))
*** Eval error ***  Wrong type argument: stringp, [a b]






This bug report was last modified 14 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.