From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Parsing property drawers in subtree scope exports Date: Sat, 01 Jul 2017 09:48:50 +0200 Message-ID: <87y3s84mxp.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRD9D-0006U1-4U for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 03:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRD9C-0003uT-Fs for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 03:48:55 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:35774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dRD9C-0003r0-9o for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 03:48:54 -0400 In-Reply-To: (Kaushal Modi's message of "Sat, 01 Jul 2017 06:58:20 +0000") 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" To: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > I have this test Org file: > > ===== > * Title > :PROPERTIES: > :FOO: 123 > :END: > Something > ===== > > I am working on an exporter back-end, and I need to get the value of the > :FOO property > - During *subtree* export (C-c C-e C-s ..) > - In the body filter fn. So I have only info and body at my access. > > I looked at ox-html.el for hints but that didn't help. In there too, the > CUSTOM_ID property drawer (picked one example I knew) is not parsed during > subtreep export. > > How can I do this? It depends. You can write it :EXPORT_FOO: and define it in the back-end options. Otherwise, you simply need to retrieve it and store it before calling `org-export-to-file' or whatever. Regards, -- Nicolas Goaziou