emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: How to capture export prepended header numbering
Date: Mon, 30 Dec 2019 22:21:47 -0600	[thread overview]
Message-ID: <875zhxjfac.fsf@alphapapa.net> (raw)
In-Reply-To: 87eewljpxi.fsf@alphapapa.net

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

Adam Porter <adam@alphapapa.net> writes:

> There is no built-in way to do that, and no way independent of
> org-export to get the numbers, AFAIK.
>
> Here's some ugly old code that shows outline numbering as overlays in an
> Org buffer.  It doesn't update automatically, so you have to run it
> again when the outline changes.  But it seems to work well.  It uses
> dash.el and let-alist, in case you don't have them loaded.

Please do disregard that monstrosity.  I rewrote it in a much simpler
way.  It seems fast on a reasonably large Org buffer.  It doesn't
account for org-indent-mode or org-bullets, but that wouldn't be too
hard to fix, I think.

No third-party packages are required.  See attached file, or
<https://github.com/alphapapa/unpackaged.el#outline-number-overlays>.


[-- Attachment #2: org-outline-numbers rewritten --]
[-- Type: application/emacs-lisp, Size: 1562 bytes --]

[-- Attachment #3: screenshot --]
[-- Type: image/png, Size: 25031 bytes --]

  parent reply	other threads:[~2019-12-31  4:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 16:34 How to capture export prepended header numbering Lawrence Bottorff
2019-12-31  0:31 ` Adam Porter
2019-12-31  0:43   ` Adam Porter
2019-12-31  4:21   ` Adam Porter [this message]
2019-12-31  4:45     ` Adam Porter

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=875zhxjfac.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --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).