]> git.eshelyaron.com Git - emacs.git/commit
Make imenu index generation for PDFs more reliable
authorVisuwesh <visuweshm@gmail.com>
Sun, 6 Oct 2024 12:32:06 +0000 (18:02 +0530)
committerEshel Yaron <me@eshelyaron.com>
Mon, 14 Oct 2024 17:37:12 +0000 (19:37 +0200)
commit7a4b05ff63b4fb44ffb1e283573e001455d7e80a
treeacc647b396d0a40bf54ff0e25cf338aa745d7aad
parent04885eb8bb461e2ae3f30de4f09b6eb7f2526a7f
Make imenu index generation for PDFs more reliable

Do away with parsing the output of "mutool show FILE outline"
since the URI reported in its output may not include the page
number of the heading, and instead may contained "nameddest"
elements which cannot be resolved using "mutool".  Instead, use
a MuPDF JS script to generate the PDF outline allowing to
resolve such URIs.

* lisp/doc-view.el (doc-view--outline-rx): Remove as no longer
needed.
(doc-view--outline): Reflect that outline can be generated for
non-PDF files too.
(doc-view--mutool-pdf-outline-script): Add new variable to hold
the JS script used to generate the outline.
(doc-view--pdf-outline): Use the script.  (bug#73638)

(cherry picked from commit 44aa385b9afe2f2d500f62fd679314150e859d77)
lisp/doc-view.el