emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to deal with 'contents' in (derived) exporter backend


From: Thorsten Jolitz
Subject: Re: [O] How to deal with 'contents' in (derived) exporter backend
Date: Wed, 06 Nov 2013 15:36:32 +0100
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

Hello,

Nicolas Goaziou <address@hidden> writes:

> Thorsten Jolitz <address@hidden> writes:
>
>> But when I use something like this in the headline transcode function
>>
>> #+begin_src emacs-lisp
>>   (format "(headline %S %s) "
>>           [... return headline string ...]
>>           contents)
>> #+end_src
>>
>> I get the parse-tree structure as output instead of elements/object
>> in their original Org text syntax as expected:
>>
>> #+begin_src emacs-lisp
>>   (org-data nil "(headline (title-string \"A1\" alt-title-string \"A1\"
>>   category \"tmp5\" level 1 priority nil tags nil todo-keyword nil
>>   quotedp nil archivedp nil commentedp nil footnote-secion-p nil)
>>   (section (#(\"Text *A1* \" 0 5 (:parent (paragraph (:begin 6 :end 16
>>   :contents-begin 6 :contents-end 16 :post-blank 0 :post-affiliated 6
>>   :parent (section (:begin 6 :end 16 :contents-begin 6 :contents-end 16
>>   :post-blank 0 :parent (headline (:raw-value \"A1\" :begin 1 :end 32
>>   :pre-blank 0 :contents-begin 6 :contents-end 32 :level 1 :priority nil
>>   :tags [...]
>> #+end_src
>
> You don't get the parse-tree structure, you get Org syntax within
> a propertized string. Try (org-no-properties contents) instead.

That does the trick, thank you very much, I was kind of stuck without
being aware of this function. 

-- 
cheers,
Thorsten




reply via email to

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