From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jose A Ortega Ruiz Newsgroups: gmane.emacs.bugs Subject: bug#58131: [PATCH] docview: new customization options for imenu Date: Wed, 28 Sep 2022 15:05:50 +0100 Message-ID: <87a66j7fwh.fsf@mail.jao.io> References: <87fsgcb5n8.fsf@mail.jao.io> <83k05nisp2.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="30699"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58131@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 28 17:39:14 2022 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 1odZ9V-0007lk-Fd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Sep 2022 17:39:13 +0200 Original-Received: from localhost ([::1]:37846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odZ9U-0007E1-HS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Sep 2022 11:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odXiI-0005h7-UT for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 10:07:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odXiI-0007s1-Ew for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 10:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odXiI-0007C7-2q for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 10:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jose A Ortega Ruiz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Sep 2022 14:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58131 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58131-submit@debbugs.gnu.org id=B58131.166437397927594 (code B ref 58131); Wed, 28 Sep 2022 14:07:02 +0000 Original-Received: (at 58131) by debbugs.gnu.org; 28 Sep 2022 14:06:19 +0000 Original-Received: from localhost ([127.0.0.1]:34026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odXhb-0007Az-5O for submit@debbugs.gnu.org; Wed, 28 Sep 2022 10:06:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odXhY-0007Am-SF for 58131@debbugs.gnu.org; Wed, 28 Sep 2022 10:06:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odXhT-0007mR-BP for 58131@debbugs.gnu.org; Wed, 28 Sep 2022 10:06:11 -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=qoit3BiOtGD2VLVpZ2ytcOQLJOftK6nLClGt+XG1WjY=; b=j2YXDyrMKYxfWQmg6aJq OpvHvzGqsBEjQzScUfYlmYB1AMFij5XN3qisOrVUd9eHx0Zk25aDLbCYzGsriT1lUpVKk/EBKBfrA KoQFs1PBhsFTMk3pmg9Op2weUR2Muu4Fcu0yEUeXrYa9+rwr1NMqgRSvRWtVJM97TNkbcnREgH5Xm 5cXeNXKh0rkNrQbusY/RNsi0qH4siZhnVqHK7190sqE5imm7MxlzyNZ7ww9LvI861uxuWFd+U/eUV xCC8ZIzGiQgWhtI2w6YaynGx45YHfAem6n5A+/ksldqZGC4WkOPFhhRMfnRol8nJv755C58ALWKLM JUnXBVbUBDJWHA==; Original-Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:33824 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odXhB-0001tK-MK; Wed, 28 Sep 2022 10:06:02 -0400 Original-Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 8d53953c; Wed, 28 Sep 2022 14:05:50 +0000 (UTC) In-Reply-To: <83k05nisp2.fsf@gnu.org> 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" Xref: news.gmane.io gmane.emacs.bugs:243818 Archived-At: On Wed, Sep 28 2022, Eli Zaretskii wrote: >> From: Jose A Ortega Ruiz >> Date: Wed, 28 Sep 2022 03:21:31 +0100 >> >> A follow up to bug#58103 with a little fix for section title extraction >> and a couple of easy to implement customizable options. I've tried to >> document them clearly enough in the docstrings and then just mention >> their existence in the manual: is that a good practice or do we prefer >> some duplication? > > It's a possibility. But if you have nothing of essence to say about a > variable, why mention it in the manual at all? We don't need to > mention every user option in the manual, only the important ones. We > expect users who want to use a package to review its options (e.g., bu > "M-x customize-group") and decide which ones they want to change from > the default. That makes sense. In this case, there's just 3 variables related to the functionality, and my impression is that they provide options that users often will want... which might be taken yet as an argument for /not/ adding them to the manual, now that i think of it :) >> +(defcustom doc-view-imenu-title-format "%t (%p)" >> + "Format string for document section titles in imenu. >> + >> +The special markers '%t' and '%p' are replaced by the section >> +title and page number in this format string, which uses >> +`format-spec'. > > Will users immediately understand what you mean by "document section > title" here? If no, perhaps a sentence explaining what that is would > be beneficial. I would say they will: in the context of a docview imenu for a PDF document, there's little else it could reasonably be. But i'm biased: do you think otherwise? >> +(defcustom doc-view-imenu-flatten nil >> + "Whether to generate a flat list of sections instead of a nested tree." > > This doesn't mention imenu in the doc string; should it? Given that the name of the variable does, i think mentioning it would just make that first sentence longer without adding too much information. But again, as the implementor of the functionality, everything feels "obvious" to me. Thanks, jao -- Lying to ourselves is more deeply ingrained than lying to others. -Fyodor Dostoevsky, novelist (1821-1881)