From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: Get headline number w/o link? Date: Sat, 12 Jul 2014 06:21:45 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307d06e8c8415b04fdfd4511 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5vNw-0002JL-Cp for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 07:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5vNs-0006Yk-Dl for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 07:22:32 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:58411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5vNs-0006Wu-8b for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 07:22:28 -0400 Received: by mail-vc0-f174.google.com with SMTP id hy4so4056937vcb.5 for ; Sat, 12 Jul 2014 04:22:27 -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 --20cf307d06e8c8415b04fdfd4511 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable During HTML export, I'm trying to automatically get the headline number of the then-current headline, WITHOUT a link, so I don't want to use [[$1]]. EXAMPLE: =3D=3D=3D ORG MODE TEXT: =3D=3D=3D * Definitions {{{HL-NUM}}} ** Affiliate Definition {{{HL-NUM}}} *[body text omitted]* ** Arbitration {{{HL-NUM}}} *[body text omitted]* =3D=3D=3D DESIRED EXPORTED TEXT: =3D=3D=3D 1. Affiliate Definition [1] 1.1 Affiliate Definition [1.1] *[body text omitted]* 1.2 Arbitration [1.2] *[body text omitted]* Suggestions? I've gone rummaging through org.el, ox.el, and the HTML exporter. I tried the following but it doesn't work: #+MACRO: HL-NUM (eval (org-export-get-headline-number (org-get-heading nil nil)) nil) I'm a cargo-cult programmer at best and am just scratching the surface of Lisp and emacs Lisp. Thanks in advance. Regards, --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 =E2=80=8BEditor, =E2=80=8B=E2=80=8B=E2=80=8BCommon Draft project: Model contract term sheets & clauses, annotated 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. --20cf307d06e8c8415b04fdfd4511 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
During HTML export, I'm trying to a= utomatically get the headline number of the then-current headline, WITHOUT = a link, so I don't want to use [[$1]]. =C2=A0EXAMPLE:

=3D=3D=3D ORG MODE TEXT: = =3D=3D=3D

* Definitions {{{HL-NUM}}}

** Affiliate Definition {{{HL-NUM}}}

[body text omitted]

** Arbitration {{{HL-NUM}}}

[body text omitted]



=3D=3D=3D DESIRED EXPORTED TEXT: =3D=3D=3D

1. Affiliate Definition [1]

1.1 =C2=A0Affiliate Definition [1.1]

[body text omitted]

1.2 =C2=A0Arbitration [1.2]

[body text omitted]


Suggestions? =C2=A0I've gone rummaging through org.el, ox.el, and the H= TML exporter. =C2=A0I tried the following but it doesn't work:

#+MACRO: HL-NUM (eval (org-export-get-headline-number (org-ge= t-heading nil nil)) nil)

I'm a cargo-cult programmer at best and am just scratc= hing the surface of Lisp and emacs Lisp.

Thanks in = advance.

Regards,

--D. C.=C2=A0

Dell C<= /u>harles "D. C." Toedt III=C2=A0=C2=A0(my=C2=A0last name is pronounced "Tate&qu= ot;)=C2=A0
Attorney and neutra= l arbitrator -- tech contracts and intellectual property
=E2=80=8B=E2=80=8BCommon Draft=C2=A0project: =C2=A0Model contr= act term sheets & clauses, annotated
= 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
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intend= ed=C2=A0
to serve as an electronic signature nor as= =C2=A0assent to= an agreement.


--20cf307d06e8c8415b04fdfd4511--