emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Get headline number w/o link?


From: D. C. Toedt
Subject: [O] Get headline number w/o link?
Date: Sat, 12 Jul 2014 06:21:45 -0500

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:

=== ORG MODE TEXT: ===

* Definitions {{{HL-NUM}}}

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

[body text omitted]

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

[body text omitted]



=== DESIRED EXPORTED TEXT: ===

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. 

Dell Charles "D. C." Toedt III  (my last name is pronounced "Tate"
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft project:  Model contract term sheets & clauses, annotated
address@hidden     LinkedIn: dctoedt    Calendar (redacted)
O: +1 (713) 364-6545    C: +1 (713) 516-8968
​​
    
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]