Created
February 24, 2024 14:09
-
-
Save jeremyf/1443f1b1ed97aae3f55bf8d3a27046e4 to your computer and use it in GitHub Desktop.
An alternate implementation of Howard Abrams' `org-get-headings'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; An alternate implementation of Howard Abrams' `org-get-headings'. | |
;; | |
;; https://howardism.org/Technical/Emacs/tiddly-wiki-in-org.html | |
;; | |
;; I have not run any performance comparisons. The main difference being that | |
;; this implementation does not require defining the `unpropertize' function. | |
(defun org-get-headings () | |
"Return a list of an org document's headings." | |
(org-element-map | |
(org-element-parse-buffer 'headline nil t) | |
'headline | |
(lambda (headline) (org-element-property :title headline)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment