GNU bug report logs - #73530
[PATCH] Add imenu index function for Djvu files in doc-view

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Sat, 28 Sep 2024 15:12:02 UTC

Severity: wishlist

Tags: patch

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 73530 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: jao <jao <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 73530 <at> debbugs.gnu.org,
 Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#73530: [PATCH] Add imenu index function for Djvu files in
 doc-view
Date: Sat, 28 Sep 2024 21:15:31 +0200
jao <jao <at> gnu.org> writes:

>>>>> doc-view-imenu-enabled
>
> If I recall correctly, that flag is there to save CPU cycles in case
> users of doc-view are not interested in imenu.
>
> The PDF's outline is scanned using mutool when doc-view-mode is
> activated if doc-view-imenu-enabled is true, and for big files that
> can take a second or two.
>
> I am not sure why I didn't delay creation of the index, but it's
> probably because there are menu entries to create and I didn't bother
> to investigate deeper. Also, because I didn't want to see a pause the
> first time imenu was invoked on a PDF.

Thanks for explaining!

> Admittedly, most of the time the pause is small enough to make all of
> the above moot.

I think I'd prefer to delay the creation of the index until imenu is
invoked the first time and get rid of doc-view-imenu-enabled.  If we
really wanted to and the requirements are met, we could also run the
index creation in an idle-timer.  Probably not by default but maybe by
adding and documenting a function one could add to doc-view-mode-hook
for that purpose.

Bye,
  Tassilo




This bug report was last modified 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.