File: org-num.el.html

This library provides dynamic numbering for Org headlines. Use

    <M-x org-num-mode>

to toggle it.

You can select what is numbered according to level, tags, COMMENT keyword, or UNNUMBERED property. You can also skip footnotes sections. See org-num-max-level, org-num-skip-tags, org-num-skip-commented, org-num-skip-unnumbered, and org-num-skip-footnotes for details.

You can also control how the numbering is displayed by setting org-num-face and org-num-format-function.

Internally, the library handles an ordered list, per buffer position, of overlays in org-num--overlays. These overlays are marked with the org-num property set to a non-nil value.

Overlays store the level of the headline in the level property, and the face used for the numbering in numbering-face.

The skip property is set to t when the corresponding headline has some characteristic -- e.g., a node property, or a tag -- that prevents it from being numbered.

An overlay with org-num property set to invalid is called an invalid overlay. Modified overlays automatically become invalid and set org-num--invalid-flag to a non-nil value. After a change, org-num--invalid-flag indicates numbering needs to be updated and invalid overlays indicate where the buffer needs to be parsed. So does org-num--missing-overlay variable. See org-num--verify function for details.

Numbering display is done through the after-string property.

Defined variables (15)

org-num--comment-reRegexp matching a COMMENT keyword at headline beginning.
org-num--invalid-flagNon-nil means an overlay became invalid since last update.
org-num--missing-overlayBuffer position signaling a headline without an overlay.
org-num--numberingCurrent headline numbering.
org-num--overlaysOrdered list of overlays used for numbering outlines.
org-num--skip-levelLevel below which headlines from current tree are not numbered.
org-num-faceFace to use for numbering.
org-num-format-functionFunction used to display numbering.
org-num-max-levelLevel below which headlines are not numbered.
org-num-modeNon-nil if Org-Num mode is enabled.
org-num-mode-hookHook run after entering or leaving ‘org-num-mode’.
org-num-skip-commentedNon-nil means commented sub-trees are not numbered.
org-num-skip-footnotesNon-nil means footnotes sections are not numbered.
org-num-skip-tagsList of tags preventing the numbering of sub-trees.
org-num-skip-unnumberedNon-nil means numbering obeys to UNNUMBERED property.

Defined functions (14)

org-num--clear()
org-num--current-numbering(LEVEL SKIP)
org-num--headline-regexp()
org-num--invalidate-overlay(O)
org-num--make-overlay(NUMBERING LEVEL SKIP)
org-num--number-region(START END)
org-num--overlay-p(O)
org-num--refresh-display(OVERLAY NUMBERING)
org-num--skip-value()
org-num--update()
org-num--valid-overlay-p(O)
org-num--verify(BEG END _)
org-num-default-format(NUMBERING)
org-num-mode(&optional ARG)

Defined faces (0)