From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jao Newsgroups: gmane.emacs.bugs Subject: bug#73530: [PATCH] Add imenu index function for Djvu files in doc-view Date: Sat, 28 Sep 2024 20:03:48 +0100 Message-ID: <87zfnrzjl7.fsf@mail.jao.io> References: <8734ljg6f5.fsf@gmail.com> <86msjr6ayu.fsf@gnu.org> <874j5ziudn.fsf@gnu.org> <87y13bel5m.fsf@gmail.com> <-wirQcNBR0cpaXo0jL0sp8CxUkFsFX_iWUm_BoGq4ChYLccOyN7QJN53eHf0Q-AncT65owrhqfPWYnnQO3gRHw==@protonmail.internalid> <87setjhcm6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22444"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 73530@debbugs.gnu.org, Visuwesh To: "Tassilo Horn" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 28 21:05:07 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1suckd-0005in-62 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Sep 2024 21:05:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suck8-000857-0r; Sat, 28 Sep 2024 15:04:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suck5-00084o-Oe for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 15:04:34 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1suck5-00010s-GA for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 15:04:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=b+AHIjQoUszTUzDIrIpsQhZUxXIwO7iQcx2AlzsdC9I=; b=lFrBWERTId6nmmDA3Q8Rr6TtGnleHOFTJB+YYm+uWvLh4FxEI6NhHH3QMLk4ridLVFwa9AS7CFtCoHQThUeRGvsjZBx46PrGUaI1c6hAL2hdoPMvqdNjSe68sZ6orFchHcDjvW5FPN+XQ6KvzFpM9xUeQ8pGmF4Mn203nU4XGwt1eyeHKWRWyHPcc0/5DQ7EI8kqI7Jp+rk/NKgEMtDSzeOpeAXeFkCgBY5PKRBBzLMCQGQmR8eYyF+8Xiw2ljk+e8SMoIx3j70h4qrB6DYD7apo4f3U/TbdumSUpqioV/7Ct5h7jHh0oQ97/N76n5ujh9ySxUXqDv/LMdqL6lmttQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1suckY-0004vV-Mv for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 15:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Sep 2024 19:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73530 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73530-submit@debbugs.gnu.org id=B73530.172755027118794 (code B ref 73530); Sat, 28 Sep 2024 19:05:02 +0000 Original-Received: (at 73530) by debbugs.gnu.org; 28 Sep 2024 19:04:31 +0000 Original-Received: from localhost ([127.0.0.1]:39756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suck3-0004sy-3b for submit@debbugs.gnu.org; Sat, 28 Sep 2024 15:04:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suck0-0004sM-JF for 73530@debbugs.gnu.org; Sat, 28 Sep 2024 15:04:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sucjQ-0000z8-8w; Sat, 28 Sep 2024 15:03:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=b+AHIjQoUszTUzDIrIpsQhZUxXIwO7iQcx2AlzsdC9I=; b=XUs0C62wCyEsNvT6US/d sBFTBQcQSOxEsotX2n63a5evj1MjCLE4Wmubah9+yYr/ihtq8cpCfmXAlTate7GlA+MGj2SYHvW92 VfOgaeiLfdRSv18AVfWWUqA+qz93bxujZNGhvWwd2m4I1k5SAwzncKuBNZiNmTZVj2RTliCqgGC+l PXLi31rt2LFczTMZ9v4D7gT6yG8QJ4IW+YW/dvDEQsIYGdSe+fK2UN+8LSFGXHdK7MH6WQmfTWa36 8hWLbk5wl5w9UMQZrydgnvZutXTY2qzE0U5by40nKU4nz4ApUpvVdOlYx+/Babp52I7d79Z42xMVa BDHd1wFjHzTJ4A==; In-Reply-To: <87setjhcm6.fsf@gnu.org> (Tassilo Horn's message of "Sat, 28 Sep 2024 20:11:45 +0200") X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292601 Archived-At: On Sat, Sep 28 2024, Tassilo Horn wrote: > Visuwesh writes: > >>>> doc-view-imenu-enabled >>> >>> Indeed. And while we are here: doesn anyone know why we have an >>> option to disable imenu support? I see that we have that since Jose >>> contributed the initial imenu support but why? I can't see any harm >>> done if it was always enabled and would give a user-error like "For >>> imenu support for XXX files, program YYY has to be installed" or >>> something when invoking imenu. And why someone might want to disable >>> it even if the required program is available is beyond my >>> imagination. I mean, if you don't want to use imenu, then just don't >>> invoke it... >> >> I was wondering the same thing, especially since the cost of making the >> imenu index is not that high. > > So lets ask Jose (added to Cc). 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. Admittedly, most of the time the pause is small enough to make all of the above moot. Cheers, jao -- Many people take no care of their money till they come nearly to the end of it, and others do just the same with their time. -Johann Wolfgang von Goethe (1749-1832)