all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Circular lists/shared structures in org-element parse-tree
@ 2013-06-28 19:50 Thorsten Jolitz
  2013-06-28 20:43 ` Daimrod
  0 siblings, 1 reply; 8+ messages in thread
From: Thorsten Jolitz @ 2013-06-28 19:50 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

I wonder how I can find out in a (elisp) program the points in the parse
tree (returned by org-element-parse-buffer) where shared structures are
used. 

In the read-syntax, its easy to see (especially with `print-circle' set
to non-nil):

#+begin_src emacs-lisp
  #2=(org-data nil #1=(headline (:raw-value "header 1"
   [...] :parent #2#) [...]  
#+end_src

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?

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Circular lists/shared structures in org-element parse-tree
@ 2013-06-28 20:28 Thorsten Jolitz
  0 siblings, 0 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2013-06-28 20:28 UTC (permalink / raw)
  To: help-gnu-emacs


[Originally posted on the Org-mode mailing list, but I post it here too
since it is more an elisp oriented mailing list]

Hi List, 

I wonder how I can find out in a (elisp) program the points in the parse
tree (returned by org-element-parse-buffer) where shared structures are
used. 

In the read-syntax, its easy to see (especially with `print-circle' set
to non-nil):

#+begin_src emacs-lisp
  #2=(org-data nil #1=(headline (:raw-value "header 1"
   [...] :parent #2#) [...]  
#+end_src

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?

-- 
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.2733.1372451360.22516.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2013-06-29  2:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28 19:50 Circular lists/shared structures in org-element parse-tree Thorsten Jolitz
2013-06-28 20:43 ` Daimrod
2013-06-28 21:59   ` Thorsten Jolitz
  -- strict thread matches above, loose matches on Subject: below --
2013-06-28 20:28 Thorsten Jolitz
     [not found] <mailman.2733.1372451360.22516.help-gnu-emacs@gnu.org>
2013-06-28 21:26 ` Pascal J. Bourguignon
2013-06-28 22:06   ` Thorsten Jolitz
2013-06-29  2:28     ` Stefan Monnier
     [not found]   ` <mailman.2745.1372457176.22516.help-gnu-emacs@gnu.org>
2013-06-28 23:20     ` Pascal J. Bourguignon

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.