that is often true, especially with large buffers, but you have to add a
bunch of code to go to point-max, and check the level with this.
#+BEGIN_SRC emacs-lisp
(save-excursion
(goto-char (point-max))
(let (components
(headings '()))
(while (re-search-backward org-complex-heading-regexp ni
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
Hello Florian
On 19 May 2021, Florian Lindner wrote:
Hello,
I, an Emacs Lisp newbie, want to get a list of all top-level
headings
of the current buffer. My approach so far is:
(defun test-org-map()
(interactive)
(setq headings '())
(org-map-entries (lambda ()
(set
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"
Hello,
I, an Emacs Lisp newbie, want to get a list of all top-level headings of the
current buffer. My approach so far is:
(defun test-org-map()
(interactive)
(setq headings '())
(org-map-entries (lambda ()
(setq current-header-item (org-element-property :title
(org-