From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to deal with 'contents' in (derived) exporter backend Date: Tue, 05 Nov 2013 21:21:46 +0100 Message-ID: <878ux2d2g5.fsf@gmail.com> References: <87r4awjqmf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdn88-0005ry-GU for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 15:21:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vdn80-0005AM-36 for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 15:21:40 -0500 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:55011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdn7z-0005A2-S7 for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 15:21:32 -0500 Received: by mail-ee0-f49.google.com with SMTP id e52so2043077eek.8 for ; Tue, 05 Nov 2013 12:21:30 -0800 (PST) In-Reply-To: <87r4awjqmf.fsf@gmail.com> (Thorsten Jolitz's message of "Mon, 04 Nov 2013 13:30:48 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hello, Thorsten Jolitz 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. Regards, -- Nicolas Goaziou