From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64048: 30.0.50; global-display-line-numbers-mode has no easy way to set modes where it is enabled Date: Sat, 17 Jun 2023 21:58:04 +0300 Message-ID: <83r0q9q5kz.fsf@gnu.org> References: <87a5x3sa7w.fsf@localhost> <83bkhjweco.fsf@gnu.org> <875y7rs5s5.fsf@localhost> <835y7rwbmb.fsf@gnu.org> <87352vs2g5.fsf@localhost> <83wn07usx7.fsf@gnu.org> <87sfavqhn5.fsf@localhost> <83mt12uufn.fsf@gnu.org> <87fs6u8b0p.fsf@localhost> <83ttv6r0oy.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1914"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64048@debbugs.gnu.org, yantar92@posteo.net To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 20:59:24 2023 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 1qAb8u-0000Lw-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 20:59:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAb8a-0007K6-JY; Sat, 17 Jun 2023 14:59:04 -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 1qAb8Y-0007Jh-N1 for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 14:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAb8Y-00042U-F6 for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 14:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAb8X-0005YW-UQ for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 14:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 18:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64048 X-GNU-PR-Package: emacs Original-Received: via spool by 64048-submit@debbugs.gnu.org id=B64048.168702829721304 (code B ref 64048); Sat, 17 Jun 2023 18:59:01 +0000 Original-Received: (at 64048) by debbugs.gnu.org; 17 Jun 2023 18:58:17 +0000 Original-Received: from localhost ([127.0.0.1]:52634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAb7n-0005XU-R4 for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:58:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAb7j-0005XG-TC for 64048@debbugs.gnu.org; Sat, 17 Jun 2023 14:58:15 -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 1qAb7e-0003yn-D5; Sat, 17 Jun 2023 14:58:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sfafDe8j+flwdikeZIZsh3wn1fDsrKDiNN/ySi2tTCM=; b=lX7qfgeRVjh+ Ec0/oKeRql7+jRq+p5qVB1fB5DmQZ9Sl5bT42Ww3LdcIlDRb2k/+uVjBpmqdymCPILOU5tN2+CUUD NlJjpqwF7/kCmWZocx83VQWIwLI0GdkQuWHZdNS+xe2IVnjWqzbO2aW2SpN3TTA8Im+Lo0QFGEtY/ YkWXqQO0Wao2UFBDF3bREdAC+LTn9G4ZAP7BJaNkAK/waB74cKw3LDs2Uw8URBkP4flgn+xns6Bgp OPopHV+AHl9CwJEtduidLr/euMU1O4l+w1p2HYwFXD0gPyH4gGF+n+/Zya9Zku+ZOvSFR6ddUxwN6 tQzm1PClvminAUX5zCNkDw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAb7c-0006NF-0U; Sat, 17 Jun 2023 14:58:06 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 17 Jun 2023 14:30:30 -0400) 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:263571 Archived-At: > From: Stefan Monnier > Cc: Ihor Radchenko , 64048@debbugs.gnu.org > Date: Sat, 17 Jun 2023 14:30:30 -0400 > > > Stefan, is our current documentation of :predicate incomplete? > > I'm not really familiar with that argument (AFAICT it was implemented > by Lars in commit b8b18cf34a04a). The whole feature puts me off a bit > because of its name: in my world a "predicate" is a kind of function, > so I think it's a poor name for a variable containing some list-based > description of a set of modes. > > But indeed, it seems the docstring forgets to mention that the > `:predicate MODES` argument causes the introduction of a new variable > called `MINOR-MODE-predicate` and whose default value is MODES. That's mostly already documented. What is NOT documented is that by giving that variable a non-default value one can affect in which modes this minor mode will be turned on and in which it will be turned off. IOW, the fact that this variable can be used for user customizations is not documented at all. And your answer just hints on whether the above is true. > Stefan "who'd rename the `:predicate` arg to something like > `:modes` and the `MODE-predicate` variable to something > like `MODE-modes`." I guess it's too late for renaming this?