On 26/09/2022 22:21, Max Nikulin wrote:
On 26/09/2022 18:53, reza wrote:

Is there a way to extract a toc from an org file e.g:

      #+INCLUDE: myfile.org :toc only

I want to assemble the toc's from several files into one file and there
seems to be no easy way to do this.

Likely `org-element-map' allows to extract headings. There are should be some example in the mail list archive and at worg (hacks, perhaps in FAQ).

See also info "(org) Using the Mapping API"
https://orgmode.org/manual/Using-the-Mapping-API.html
for `org-map-entries'.


Reply via email to