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 16:14:13 +0100 Message-ID: <877d1n7cqi.fsf@mail.jao.io> References: <87fsgcb5n8.fsf@mail.jao.io> <83k05nisp2.fsf@gnu.org> <87a66j7fwh.fsf@mail.jao.io> <83edvvinjk.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="31511"; 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:24:23 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 1odYv9-0007xD-2g for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Sep 2022 17:24:23 +0200 Original-Received: from localhost ([::1]:38518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odYv8-0001dK-2t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Sep 2022 11:24:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odYm6-0003Bn-KR for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 11:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odYm6-0005Y3-C7 for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 11:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odYm6-0002jk-6q for bug-gnu-emacs@gnu.org; Wed, 28 Sep 2022 11:15: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 15:15: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.166437806810449 (code B ref 58131); Wed, 28 Sep 2022 15:15:02 +0000 Original-Received: (at 58131) by debbugs.gnu.org; 28 Sep 2022 15:14:28 +0000 Original-Received: from localhost ([127.0.0.1]:34206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odYlY-0002iS-12 for submit@debbugs.gnu.org; Wed, 28 Sep 2022 11:14:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odYlV-0002iE-A3 for 58131@debbugs.gnu.org; Wed, 28 Sep 2022 11:14:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odYlO-0005TS-Av; Wed, 28 Sep 2022 11:14:19 -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=kD8lY/4j94OmsJXTpPmFU6mHSFH/mcu90My0Z0r+BoE=; b=Snh8P7TmzGI18f+zy7we YrGK/4WdC9PQLB2G55NVQQpSBxZA9LMJXfowf3lWW2N8LVtVIHS3tX1TLJ6r+EuVIWtqirOdpu6HJ 6dkz85fzHDzgKCcuT8jcZo06dk80ChWb0mFTecYlpNGghyk6c4UKc2GP/Gkirek5b2XtPYjBR2ENe 4rXSFteh7t/n5IZkuziUPbwjMkihcRKCJogS0PGT8MsQyGrh5wPc1P+smdiiEWITiPrEJoos6Oraz Cno/F5Zn2sKKQQtu5guWZC64Fl5MYykas6gSNM5FpIR7TijCvNIOBn1JRW2fJ279YCZdX3GU5wDuA N79Fkq9to3FYNQ==; Original-Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:47728 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 1odYlN-0006hO-Rj; Wed, 28 Sep 2022 11:14:18 -0400 Original-Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 8f0e5aeb; Wed, 28 Sep 2022 15:14:13 +0000 (UTC) In-Reply-To: <83edvvinjk.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:243815 Archived-At: On Wed, Sep 28 2022, Eli Zaretskii wrote: >> From: Jose A Ortega Ruiz >> Cc: 58131@debbugs.gnu.org >> Date: Wed, 28 Sep 2022 15:05:50 +0100 >> >> >> +(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? > > FWIW, I couldn't understand what that means. > > How does being in the context of docview imenu for a PDF document help > understanding that here? "Document section title" is general enough > terminology. Using a "construct state" here doesn't help, either. To me, the context is that this is read by a user of the functionality, wanting to fine-tune it (i rarely start exploring a functionality by reading the docstring of one of its customizable variables). Barring that: the Imenu section of the manual calls the items being formatted here simply "definitions". If we assume that the user knows about imenu in general, one could have: "Format string for the imenu definitions extracted from documents." Or, perhaps, trying to provide the missing context for not-yet-users: "Format string for the section titles extracted by imenu from docview documents." Any better? >> >> +(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. > > My suggestion is > > Whether to flatten the list of sections in an imenu or show it nested. Sounds better to me too, yes. Thanks, jao -- Nothing so soothes our vanity as a display of greater vanity in others; it makes us vain, in fact, of our modesty. -Louis Kronenberger, writer (1904-1980)