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: Tue, 13 Jun 2023 18:50:47 +0300 Message-ID: <83bkhjweco.fsf@gnu.org> References: <87a5x3sa7w.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30007"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64048@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 13 17:51:21 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 1q96Ij-0007e1-7z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jun 2023 17:51:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q96IW-0000SG-A5; Tue, 13 Jun 2023 11:51:08 -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 1q96IR-0000S6-7U for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:51:03 -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 1q96IQ-0002Ax-VH for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q96IQ-00034C-Bf for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 11:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 15:51:02 +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.168667143911758 (code B ref 64048); Tue, 13 Jun 2023 15:51:02 +0000 Original-Received: (at 64048) by debbugs.gnu.org; 13 Jun 2023 15:50:39 +0000 Original-Received: from localhost ([127.0.0.1]:42808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96I2-00033Z-Lu for submit@debbugs.gnu.org; Tue, 13 Jun 2023 11:50:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q96Hz-00033J-C8 for 64048@debbugs.gnu.org; Tue, 13 Jun 2023 11:50:36 -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 1q96Ht-00025K-I6; Tue, 13 Jun 2023 11:50:29 -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=UTGKCJrYSkxeUJ6vSQM+8OaSsMVTEBxY6nYtw8hRIDs=; b=q1nuwv0Q00sw YQPEMCmB5x1hxx8cE2+UJwYIG0JVQpOWcyJieC8OG/49FvNR2YXcNY9OmgDnsCaCjx8VQ//yG9bdR YfVOb+xCnkgo3fjhFbua21muDlWngdWCXDR7mOJOqkxqs3KlTkk4fpS0PJhEpGkIkAd7mgZGVQJvl 5QqGqXozDaD7laT94185EYF1K9lFWU1jEMtkGa3an+l32LL9tzZi04qrLlS+DEk9JZWzncYBuJ8N7 ZTliW9aqCAtTLwTTKJ0Vg081gwa27gICToh00V2HFHjFk+UOj2h2yxfiKSmtsBDCJf+IIUCXe96mI eO++jEKidA+wLsDj0XHsHA==; 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 1q96Ht-0007Ld-26; Tue, 13 Jun 2023 11:50:29 -0400 In-Reply-To: <87a5x3sa7w.fsf@localhost> (message from Ihor Radchenko on Tue, 13 Jun 2023 14:33:39 +0000) 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:263327 Archived-At: > From: Ihor Radchenko > Date: Tue, 13 Jun 2023 14:33:39 +0000 > > global-display-line-numbers-mode is defined as > > (define-globalized-minor-mode global-display-line-numbers-mode > display-line-numbers-mode display-line-numbers--turn-on) > > Which unconditionally enables it when `display-line-numbers--turn-on' > returns t. > > Wouldn't it be nicer to have something like > > (define-globalized-minor-mode global-display-line-numbers-mode > display-line-numbers-mode display-line-numbers--turn-on > :predicate #'display-line-numbers--turn-on) > > that will also define `display-line-numbers-modes' variable that > controls where the global mode is enabled/disabled? > > Maybe it should even be the default in `define-globalized-minor-mode' > when :predicate is not defined. > > WDYT? I think it's too late for such changes, because it will definitely break someone's setup.