[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: toc-mode
From: |
Jose A Ortega Ruiz |
Subject: |
Re: [ELPA] New package: toc-mode |
Date: |
Tue, 20 Sep 2022 22:30:05 +0100 |
On Tue, Sep 20 2022, dalanicolai wrote:
> This package has been for a while on MELPA now, but it would be nice if it
> could be moved to ELPA. The source can be found at
> https://github.com/dalanicolai/toc-mode.
>
> I would like to mention that the PDF functionalities largely depend on
> pdf-tools, which is not on ELPA of course (doc-view unfortunately does
> not provide the right features). I am not sure if that somehow is a
> problem.
for doc-view, if you're willing to rely on "mutool" (a cli program that
is installed with mupdf), one can extract an outline with something
similar to this function:
https://codeberg.org/jao/elibs/src/branch/main/lib/doc/jao-pdf.el#L48
i then for instance use it to provide imenu jumping with this code:
https://codeberg.org/jao/elibs/src/branch/main/lib/doc/jao-doc-view.el#L50
just in case you'd like to add something like that to your package (all
in all it's just a dozen lines per function).
cheers,
jao
--
Who knows what Columbus would have discovered if America hadn't got in the
way. -Stanislaw J. Lec, poet and aphorist (1909-1966)