From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Parsing property drawers in subtree scope exports Date: Sat, 01 Jul 2017 13:09:37 +0000 Message-ID: References: <87y3s84mxp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f40304360a02aa213a0553413fe5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRI9o-0002SZ-DY for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 09:09:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRI9n-0005JD-Dy for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 09:09:52 -0400 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:34583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRI9n-0005IQ-5v for emacs-orgmode@gnu.org; Sat, 01 Jul 2017 09:09:51 -0400 Received: by mail-lf0-x22c.google.com with SMTP id l13so82872542lfl.1 for ; Sat, 01 Jul 2017 06:09:51 -0700 (PDT) In-Reply-To: <87y3s84mxp.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-org list --f40304360a02aa213a0553413fe5 Content-Type: text/plain; charset="UTF-8" Hello, On Sat, Jul 1, 2017, 3:48 AM Nicolas Goaziou wrote: > > You can write it :EXPORT_FOO: and define it in the back-end options. > I didn't follow that. Do you mean that the "EXPORT_" is a special prefix? Or "EXPORT" is any backend prefix I choose? Should that be added to these? ===== :options-alist '((:hugo-front-matter-format "HUGO_FRONT_MATTER_FORMAT" nil org-hugo-front-matter-format) (:hugo-tags "HUGO_TAGS" nil nil) ===== I already tried above, but I don't know how to get the ":HUGO_TAGS" value from the property drawer, in subtreep export only, in the body filter (with only body and info available). If it is a full document export, I can use the "org export parse headlines" function (forgot the name, on the phone at the moment) to get the properties from each headline. But the same doesn't work when exporting just one sub-tree. Otherwise, you simply need to retrieve it and store it before calling > `org-export-to-file' or whatever. Hmm, will give this a try.. may be look at the pre export hook? Thank you. -- Kaushal Modi --f40304360a02aa213a0553413fe5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
On Sat, Jul 1, 2017, 3:48 AM Nicolas Goaziou <<= a href=3D"mailto:mail@nicolasgoaziou.fr">mail@nicolasgoaziou.fr> wro= te:

You can write it :EXPORT_FOO: and define it in the back-end options.

I didn't follow that. Do you mean t= hat the "EXPORT_" is a special prefix? Or "EXPORT" is a= ny backend prefix I choose?

Should that be added t= o these?

=3D=3D=3D=3D=3D
:options-alist = '((:hugo-front-matter-format "HUGO_FRONT_MATTER_FORMAT" nil o= rg-hugo-front-matter-format)
(:hugo-tags "HUGO_T= AGS" nil nil)
=3D=3D=3D=3D=3D

I already tr= ied above, but I don't know how to get the ":HUGO_TAGS" value= from the property drawer, in subtreep export only, in the body filter (wit= h only body and info available).=C2=A0

If it is a = full document export, I can use the "org export parse headlines" = function (forgot the name, on the phone at the moment) to get the propertie= s from each headline. But the same doesn't work when exporting just one= sub-tree.=C2=A0

Otherwise, you simply need to retrieve it and store it before calling
`org-export-to-file' or whatever.

Hmm, will give this a try.. may be look at the pre export hook?
=
Thank you.=C2=A0
--

Kaushal Modi

--f40304360a02aa213a0553413fe5--