emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] (Maybe) enhance `org-element-src-block-interpreter'?


From: Thorsten Jolitz
Subject: Re: [O] (Maybe) enhance `org-element-src-block-interpreter'?
Date: Wed, 06 Aug 2014 16:15:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Thorsten Jolitz <address@hidden> writes:
>
>> I see, thanks. I'm still getting used to the 'org-element API', but it
>> seems to be much easier than I thought: just use
>> org-element-at-point' and
>> `org-element-interpret-data' in most cases ...
>
> Correct.
>
> For completeness, if you're working at the local level (i.e. with
> `org-element-at-point'), available accessors are
>
>   - `org-element-type'
>   - `org-element-property'
>
> When you're working at the global level (i.e. with
> `org-element-parse-buffer'), you get another accessor,
> `org-element-contents', and some tools to modify the parse tree
>
>   - `org-element-put-property'
>   - `org-element-adopt-element'
>   - `org-element-insert-before'
>   - `org-element-extract-element'
>   - `org-element-set-element'
>
> In both cases, `org-element-interpret-data' is the only way to turn data
> back into Org syntax.

That makes things much clearer, thanks.

I definitely would have used `org-element-put-property' to modify a
'local' parse-tree too, but I can just as well directly use `plist-put'
on the raw plist in its cdr - would that be the correct way?

-- 
cheers,
Thorsten




reply via email to

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