Vitalie Spinu <spinu...@gmail.com> writes:

> Is there an easy way to copy org sub-tree in :filter-parse-tree?
>
> The structure of the parsed tree is somewhat complicated with recursive
> references to parents in multiple places. So, copy-tree infloops.

You will get a better answer most likely, but with (org-no-properties
contents) you can get the original Org-syntax of a parse-tree element,
e.g. applied to all sections (untested):

,----------------------------------------------------------------
| (defun org-myexp-section (section contents info)
|   "Transcode SECTION element into myexp syntax.
| CONTENTS is its contents, as a string or nil. INFO is ignored."
|   (if (and contents (stringp contents) (> (length contents) 0))
|       (format "%S"
|               (org-no-properties contents))
|     ""))
`----------------------------------------------------------------

-- 
cheers,
Thorsten


Reply via email to