emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-export: how to copy the parsed tree?


From: Thorsten Jolitz
Subject: Re: [O] org-export: how to copy the parsed tree?
Date: Sat, 01 Mar 2014 09:45:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Vitalie Spinu <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]