Hello, Matt Lundin <m...@imapmail.org> writes:
> Clearly, this is still very inadequate, but it is an improvement. I > would love to use the built in site-map functions, but they are simply > to slow for any larger projects. > > Could we do something like this to speed it up? > > (with-temp-buffer > (insert-file-contents file) > (goto-char (point-min)) > (when (re-search-forward "^#\\+TITLE:" nil t) > (org-element-at-point))) No, you also need to parse #+SETUPFILE: keywords. You could also get false positive within a verbatim block: #+begin_example #+title: something #+end_example However, it is possible to write a specialized function to extract only #+TITLE. Another option is to cache results. See `org-publish-cache-set' and `org-publish-cache-get'. Regards, -- Nicolas Goaziou