An Emacs package that implements Luhmann's numbering system for Org mode.
org-luhmann provides a systematic way to organize your notes using Luhmann's numbering system in Org mode. This system enables:
- Hierarchical numbering (e.g., 1, 1.1, 1.2)
- Branch sequences with letters (e.g., 1a, 1b, 1c)
- Infinite insertion between existing notes
- Automatic number generation based on context
org-luhmann is designed to work incrementally, helping you build your note structure one node at a time. Unlike automatic outline numbering, it:
- Does not automatically number all headings at once
- Generates numbers based on existing context (siblings and parents)
- Lets you choose the relationship of new nodes to existing ones
- Preserves the semantic meaning of your note structure
When you add a new number, org-luhmann analyzes:
- Current heading's level
- Previous sibling's number (if any)
- Parent's number (if any)
- Existing branch sequences
Then offers appropriate numbering options like:
- Next main sequence number (1, 2, 3, ...)
- Next branch letter (1a, 1b, 1c, ...)
- Next sub-number (1.1, 1.2, ...)
- Next parent branch (2.1, 2.2, ...)
This approach ensures that your note structure grows organically and maintains meaningful relationships between notes.
(use-package org-luhmann
:straight (:host github :repo "yibie/org-luhmann")
:after org
:config
(org-luhmann-setup))
- Download
org-luhmann.el
to your load-path - Add to your init file:
(require 'org-luhmann)
(org-luhmann-setup)
M-x org-luhmann-add-number
- Add a Luhmann number to current headingM-x org-luhmann-add-node
- Create a new heading with a Luhmann number
* 1 Main topic
** 1.1 First subtopic
** 1.2 Second subtopic
** 1.2a Branch of 1.2
** 1.2b Another branch
** 1.2.1 Sub-subtopic
* 2 Second main topic
When adding a number, you'll be prompted with these options:
- New main number (e.g., next available top-level number)
- Continue sequence (add letter suffix)
- Branch from current (create sub-number)
- Branch from parent (create sibling number)
;; Customize separator between number and title
(setq org-luhmann-title-separator " ")
;; Optional: Use numbers instead of stars for display
(setq org-luhmann-display-style 'number)
(org-luhmann-display-mode 1)
The package provides two display styles for headlines:
star
: Traditional org-mode stars (default)number
: Replace stars with Luhmann numbers
You can toggle the display enhancement with M-x org-luhmann-display-mode
.
- Added display enhancement mode to optionally hide org-mode stars
- Integrated display functionality into main package
- Added customization option for headline display style
- Initial release
- Basic Luhmann numbering system implementation
- Number generation and management
- Interactive commands for adding numbers and nodes
This project is licensed under the MIT License.
Yibie ([email protected])