emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "D. C. Toedt" <dc@toedt.com>
To: emacs-orgmode@gnu.org
Subject: Get headline number w/o link?
Date: Sat, 12 Jul 2014 06:21:45 -0500	[thread overview]
Message-ID: <CAGN11+07DgOQsHSRhR1PZWog0Kg0kva1QoAJ7D_-Ua5vk+t_HQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]

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.

*D*ell *C*harles "D. C." Toedt III  *(my** last name is pronounced "Tate") *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft <http://www.commondraft.org/> project:  Model
contract term sheets & clauses, annotated
dc@toedt.com     LinkedIn: dctoedt <http://www.linkedin.com/in/dctoedt>
Calendar
<https://www.google.com/calendar/embed?src=dc.toedt@toedt.com&mode=WEEK>
(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.

[-- Attachment #2: Type: text/html, Size: 7810 bytes --]

                 reply	other threads:[~2014-07-12 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGN11+07DgOQsHSRhR1PZWog0Kg0kva1QoAJ7D_-Ua5vk+t_HQ@mail.gmail.com \
    --to=dc@toedt.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).