GNU bug report logs -
#26629
25.1.50; Feature-request: Structure-preserving copying of sequences
Previous Next
Reported by: Tobias Zawada <i <at> tn-home.de>
Date: Sun, 23 Apr 2017 22:37:01 UTC
Severity: wishlist
Tags: moreinfo, wontfix
Found in version 25.1.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 26629 <at> debbugs.gnu.org (full text, mbox):
Tobias Zawada <i <at> tn-home.de> writes:
> The function copy-tree copies recursively but not structure preserving.
> If two cars or cdrs link to the same sub-list in the original data
> they point to two separate sub-lists in the copy.
[...]
> About the code: Traversing of the original graph and construction of the new graph are
> stack-based as it is standard. There is an additional hash-map that maps
> the already traversed old nodes to the newly created ones. If some old
> node is already in the hash-map we do not create a new one in the copied
> graph but use the mapped one from the hash map.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I haven't looked closely at the code, but this is functionality that I
vaguely remember having been requested before, and I don't think Emacs
has it yet? (But I may be wrong about that.)
I've added Stefan to the CCs; perhaps he has some comments.
This change is large enough to require a copyright assignment of the
code to the FSF -- if we decide to add the code, would you be willing to
sign such paperwork?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.