[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Circular lists/shared structures in org-element parse-tree
From: |
Thorsten Jolitz |
Subject: |
Re: [O] Circular lists/shared structures in org-element parse-tree |
Date: |
Fri, 28 Jun 2013 23:59:27 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
Daimrod <address@hidden> writes:
> Thorsten Jolitz <address@hidden> writes:
[...]
>> but when processing the parse tree as a list in elisp, how can I
>> detect the fact that
>>
>> ,------------
>> | :parent #2#
>> `------------
>>
>> refers to
>>
>> ,-----------------
>> | #2=(org-data nil
>> `-----------------
>>
>> i.e. points back to an already existing structure?
>
> AFAIK you have to track all pointers inspected to see if one has already
> be seen.
>
> For example, I've implemented a version of equal[1] to compare this kind
> of lists (to add tests to org-sync).
>
> [1]
> https://github.com/daimrod/Emacs-config/blob/master/elisp/dmd-utils.el#L25
Oh my ... I knew this would complicate my life a bit ...
Thanks for the link, this example function is indeed very helpful.
--
cheers,
Thorsten