Hi

On 19 May 2021, John Kitchin wrote:

I think this is all you need to get a list of titles of level 1
headings as strings

(org-map-entries (lambda () (fifth (org-heading-components)))
"LEVEL=1")

this also works for me:

#+BEGIN_SRC emacs-lisp
(org-map-entries (lambda () (org-element-property :title
(org-element-at-point)) ) "LEVEL=1")
#+END_SRC

This is a better approach indeed. No need to create a new list, although I get faster results using:

(while (re-search-backward org-complex-heading-regexp nil t)


--
Jonathan

Reply via email to