emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: toc-mode


From: dalanicolai
Subject: Re: [ELPA] New package: toc-mode
Date: Wed, 21 Sep 2022 09:12:31 +0200

The package is for extracting a TOC when the document does not yet contain one.
But it includes a command also to extract the TOC if the document already has one
(so that it can be altered)

I am working on some alternative/upgrade to doc-view, pdf-tools and djvu.el, although
 it might take a while as it is a lot of work. I did not make a project page yet, but will
probably post a link to it soon here. Indeed, for now it provides imenu commands for
pdf and djvu documents. If you like, I could drop the code for creating the imenu index
 here (you have it already of course, but you might like to see different solutions). Just,
let me know if you are interested.



On Tue, 20 Sept 2022 at 23:30, Jose A Ortega Ruiz <jao@gnu.org> wrote:
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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]