0

E.g., with this input:

* Test A thing! ** Testing * Hello

Get this output:

(1 3 4)

1 Answer 1

3

org-map-entries is a great function for this sort of thing:

(org-map-entries FUNC &optional MATCH SCOPE &rest SKIP)

Call FUNC at each headline selected by MATCH in SCOPE.

To do what you outlined above from within the target file it's simply a matter of:

(org-map-entries (lambda () (line-number-at-pos)) nil 'file) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.