From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: Get :PROPERTY: value from drawer in other heading during HTML export? Date: Fri, 12 Sep 2014 09:54:11 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3ec429c9ee70502df772e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSSFW-00079D-3F for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 10:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSSFR-00043f-Vz for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 10:54:58 -0400 Received: from mail-vc0-f171.google.com ([209.85.220.171]:58185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSSFR-00043M-Q8 for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 10:54:53 -0400 Received: by mail-vc0-f171.google.com with SMTP id im17so798033vcb.2 for ; Fri, 12 Sep 2014 07:54:51 -0700 (PDT) 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: emacs-orgmode@gnu.org --001a11c3ec429c9ee70502df772e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable When generating an HTML file from an org-mode document, I'd like to do a GET operation to retrieve a property value from the drawer of an arbitrary heading, using the CUSTOM_ID property to identify the heading. From Google-searching, I suspect that "org-heading-components" will be involved, but I'm not proficient enough in elisp to be able to figure out how to use it from the on-line examples I've found --- and I'm not proficient enough in Emacs to use any built-in documentation about it ("apropos" doesn't produce any results). Here's an example, where GET-PROP is a macro I'd like to use: =3D=3DBEGIN=3D=3D #+MACRO: get-prop [????] #+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the get-title macro, at https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html] * CLAUSES ** Affiliate status from voting control :PROPERTIES: :CUSTOM_ID: AffilDefn :CD-ID: AFFIL-VOTE :IMPORTANCE: Situational :PUSHBACK: Unlikely :END: (a) One individual or organization ("Person") is an {{{DEFN(Affiliate)}}} of another Person if, directly or indirectly via one or more intermediaries, one of those Persons /controls/ (as defined in subdivision (b) below), or is controlled by, or is under common control with, the other Person. (b) [other text omitted] * CONTRACT TEMPLATES ** Nondisclosure Agreement {{{GET-PROP(AffilDefn,CD-ID)}}}: {{{GET-TITLE(AffilDefn)}}} -- pushback from the other side is {{{GET-PROP(AffilDefn,PUSHBACK)}}}. # This should export to: # AFFIL-VOTE: Affiliate status from voting control -- pushback from the other side is: Unlikely. =3D=3DEND=3D=3D Thanks in advance, --D. C. *D*ell *C*harles "D. C." Toedt III *(my** last name is pronounced "Tate") = * Attorney and neutral arbitrator -- tech contracts and intellectual property Lecturer, University of Houston Law Center =E2=80=8BEditor, =E2=80=8B=E2=80=8B=E2=80=8BCommon Draft project: A readable library of best-practices contract clauses, with extensive citations and commentary, updated often. dc@toedt.com LinkedIn: dctoedt Calendar (redacted) O: +1 (713) 364-6545 C: +1 (713) 516-8968 =E2=80=8B=E2=80=8B =E2=80=8B Houston, Texas (Central time zone) Unless expressly stated otherwise, this message is not intended to serve as an electronic signature nor as assent to an agreement. --001a11c3ec429c9ee70502df772e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When generating an HTML file from an or= g-mode document, I'd like to do a GET operation to retrieve a property = value from the drawer of an arbitrary heading, using the CUSTOM_ID property= to identify the heading. =C2=A0From Google-searching, I suspect that "= ;org-heading-components&= quot; will be involved, but I'm not proficient enough in elisp to be ab= le to figure out how to use it from the on-line examples I've found ---= and I'm not proficient enough in Emacs to use any built-in documentati= on about it ("apropos" doesn't produce any results).

Here's an example, = where GET-PROP is a macro I'd like to use:

=
=3D=3DBEGIN=3D=3D

#+MACRO: get-prop [????]

<= /div>
#+MACRO: get-title [omitted -- thanks to Nicolas Go= aziou for the get-title macro, at https://lists.gnu.org/archive/htm= l/emacs-orgmode/2014-02/msg00386.html]

* CLAUSES

** Affiliate status from voting= control
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID: AffilDefn
=C2=A0 :CD-ID: AFFIL= -VOTE
=C2=A0 :IMPORTANCE: Situational
=C2=A0 :PUSHBACK: Unlikely
=C2=A0 :END:<= /div>
=
(a) One individual or organization ("Person") is an {{{DEFN(Affi= liate)}}} of another Person if, =C2=A0directly or indirectly via one or mor= e intermediaries, one of those Persons /controls/ (as defined in subdivisio= n (b) below), or is controlled by, or is under common control with, the oth= er Person.

= (b) [other text omitted]


* CONTRACT TEMPLATE= S

** Nondisclosure Agreement

{{{GET-PROP(AffilDefn,CD-ID)}}}: {{{= GET-TITLE(AffilDefn)}}} -- pushback from the other side is {{{GET-PROP(Affi= lDefn,PUSHBACK)}}}.

# This should export to: =C2=A0 =C2=A0
# AFFIL-VOT= E: Affiliate status from voting control -- pushback from the other side is:= Unlikely.

=3D=3DEND=3D=3D

Thanks in advance,

-= -D. C.=C2=A0

Dell Ch= arles "D. C." Toedt III=C2=A0=C2=A0(my=C2=A0last name is pronounced "Tate")=C2=A0
Attorney and neutral arbitrator -- tech contra= cts and intellectual property
Lecturer, University of Housto= n Law Center
=E2=80=8BEditor, =E2=80=8B=E2=80=8B=E2=80=8B= Common Draft=C2=A0project:= =C2=A0A readable library of best-practices contract clauses,
=C2=A0 = =C2=A0 =C2=A0with extensive citations and commentary, updated often.
<= div style=3D"font-size:x-small;font-family:arial,helvetica,sans-serif"><= a href=3D"mailto:dc@toedt.com" style=3D"color:rgb(17,85,204)" target=3D"_bl= ank">dc@toedt.com=C2=A0 =C2=A0 =C2=A0LinkedIn:=C2=A0dctoedt=C2=A0 =C2=A0=C2=A0Calendar=C2=A0(redacted)
O: +1 (713) 364-6545 =C2=A0 =C2=A0C: +1 (713) 516-8968
=E2=80=8B=E2=80=8B
=C2=A0 =C2=A0=C2=A0
=E2=80=8B
<= /font>Houston, Texas (Central time zone)

Unles= s expressly stated otherwise, this message is not intended=C2=A0
to serve as an electronic signature nor as= =C2=A0assent to= an agreement.


--001a11c3ec429c9ee70502df772e--