From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#73530: [PATCH] Add imenu index function for Djvu files in doc-view Date: Sun, 29 Sep 2024 20:04:13 +0530 Message-ID: <87ttdyedga.fsf@gmail.com> 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> <87zfnrzjl7.fsf@mail.jao.io> <87h69zh9nw.fsf@gnu.org> <87v7yfzhfz.fsf@mail.jao.io> <87h69yh7zp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21294"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , "Jose A. Ortega Ruiz" , 73530@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 29 16:35:49 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 1suv1Y-0005Pe-Jr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Sep 2024 16:35:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suv1J-0005Xz-Kc; Sun, 29 Sep 2024 10:35:33 -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 1suv1H-0005Xf-J3 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 10:35:31 -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 1suv1H-0005YW-1Q for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 10:35:31 -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=WK4iY3HbmbRTcnl9LcODHpfeCcWYEJbmqTnGMoMTpaE=; b=or7+VaPbHDggXbwC3hutaFDec6QlL1O1kVq9OsKOqkg8qjeJcl1L+G9EancU4W4bl0UHEBmmlAbURRmRav+Igs5xMJu8esSgoQXtRdCW1i+j7HY6LQBZ/4oo917O0hUXN76GxNxE4IAyp/L1WOOx06jtY1g3AlOXVEjVYTLudzHlCALBfGYy+6K56xPOOZsfjrjyC4htDxvyW0N4tMnk+1GWCPdaDHqDUez0eWrsPwqk91ikr2SDt2lhzBI8bReNe5wq0R2WbMDB/0jCpI1OroiJ4e7N5zMTA7Z33p8K8xUmgXZFzkZfJANCQ7EnvSZaR3p80HX0PLECxb/vQhaRwA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1suv1m-00024t-DM for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2024 14:36: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.17276205577967 (code B ref 73530); Sun, 29 Sep 2024 14:36:02 +0000 Original-Received: (at 73530) by debbugs.gnu.org; 29 Sep 2024 14:35:57 +0000 Original-Received: from localhost ([127.0.0.1]:40498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suv1h-00024R-8M for submit@debbugs.gnu.org; Sun, 29 Sep 2024 10:35:57 -0400 Original-Received: from mail-pl1-f194.google.com ([209.85.214.194]:52436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suv1f-00023r-5d for 73530@debbugs.gnu.org; Sun, 29 Sep 2024 10:35:56 -0400 Original-Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-2053525bd90so32866215ad.0 for <73530@debbugs.gnu.org>; Sun, 29 Sep 2024 07:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727620458; x=1728225258; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WK4iY3HbmbRTcnl9LcODHpfeCcWYEJbmqTnGMoMTpaE=; b=Z36gzh2adkn49mWeTJoKj+Cz1hl1a5VZ0cWOf2I5q2UcUBILKqLNRJbOLrg3lL6vKp i62bEyTXRN+hEZrGdBZvxnfbSIFE2y05WbECp9rJD7VMk1MgkkY8CCeDNaGVxgWiylR1 w7i7aROZfwPfW/tON1O7rVN7hzTjg2hihQknt1hL+FY0Tu5A2gzMGGl6KOJHsnL9lsOf 5mggkGrNqgA+5kAzVpXvpU2qAE+AvSMcfXTv9yaCDyBrgVjVKR6NE3lcMdwJkYN58GYX qu18TkocV8PiYp62RWjTeLb8kT7KwM6IOX5q0JYMhE7RbOrcvochnOHpfV6amf4ycIzH tgcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727620458; x=1728225258; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WK4iY3HbmbRTcnl9LcODHpfeCcWYEJbmqTnGMoMTpaE=; b=j52WWXsX7fuzsuxZyAQ8ncNsFxvWWGzFv03Nngj1tBCllBzfgZY8DGi9NY0+HkzTUK HKAJeQ2FmBThfAvtoThdlK+G5EAbMfcb9ar/NZeYcjOvjWwMp6PN9WkoL3AJf1ZFLnM1 6xOtpWOFLdr67lVGe/tD2Krv0GRjMIzfNECIArVtwRMfL3SUisTdoiXZHYzhUdOQ9B8y jxIUkFF/aDqbZoqa7R67C/UHH9xMVxhgvkZSqCnR5ZACaJGrbQbIzlhzocIB+kLgp3VU GRyWq6Tk3kS0PnFIM4d6tqc898DHuNYlxBhPVgqqscXJiH/TrklM2sS6KCJkUhV0AAXI leNA== X-Forwarded-Encrypted: i=1; AJvYcCWdZaPInTUas1MoZ0/Wl6zP7IN5efQ95y/N6buFyKWr8hpfCl5mfT92hdl/lB7LN8SlJ+wNRg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy31YqWmBCBLsp+4cl5m1KxLtsgdY1rtdsvsxXSVpCeiNlrGtwa GmKusyHqg6wJw6WbyUPK38N0v15zNIpKANiN2cm3ghFcGUDZ2AkO X-Google-Smtp-Source: AGHT+IGFpVbVKnZmXNsjv6Bb9Hhb4Z2WMpT8PQcRXumzLGJuE2DzA4IhxGsYWW7WZfnnfPhcG76z6w== X-Received: by 2002:a17:902:e844:b0:20b:65a8:917c with SMTP id d9443c01a7336-20b65a923c0mr53085045ad.10.1727620457666; Sun, 29 Sep 2024 07:34:17 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37e576e3sm40387565ad.261.2024.09.29.07.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 07:34:17 -0700 (PDT) In-Reply-To: <87h69yh7zp.fsf@gnu.org> (Tassilo Horn's message of "Sun, 29 Sep 2024 16:03:54 +0200") 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:292644 Archived-At: [=E0=AE=9E=E0=AE=BE=E0=AE=AF=E0=AE=BF=E0=AE=B1=E0=AF=81 =E0=AE=9A=E0=AF=86= =E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 29= , 2024] Tassilo Horn wrote: > "Jose A. Ortega Ruiz" writes: > >>> 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. >> >> FWIW, I'd keep doc-view-imenu-enabled, and use it to control the >> creation of the idle timer. The latter sounds like the right solution >> to avoid delays, and the former a much simpler strategy than asking >> users to configure hooks. > > Also fine with me. Visuwesh, would you like to proceed in that > direction? Is an idle timer necessary? Imenu calls the index function only when it finds that the index hasn't been created yet so we can rely on that mechanism instead. This would be simpler than using an idle timer. WDYT? > Thanks, > Tassilo