From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko 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 14:33:39 +0000 Message-ID: <87a5x3sa7w.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7680"; mail-complaints-to="usenet@ciao.gmane.io" To: 64048@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 13 16:30:18 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 1q952I-0001mH-Hx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jun 2023 16:30:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9527-0006uO-Hr; Tue, 13 Jun 2023 10:30:07 -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 1q9523-0006tn-OP for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 10:30:06 -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 1q9523-0000vo-Eb for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 10:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q9523-0000sa-9g for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 10:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2023 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64048 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16866665983327 (code B ref -1); Tue, 13 Jun 2023 14:30:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jun 2023 14:29:58 +0000 Original-Received: from localhost ([127.0.0.1]:42648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q951x-0000rb-Ka for submit@debbugs.gnu.org; Tue, 13 Jun 2023 10:29:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q951v-0000rT-RG for submit@debbugs.gnu.org; Tue, 13 Jun 2023 10:29:56 -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 1q951v-0006sn-Ih for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 10:29:55 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q951t-0000oi-U9 for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 10:29:55 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D72EE24002A for ; Tue, 13 Jun 2023 16:29:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1686666591; bh=Pt8KMid8wot+j8qr63dRKeOL7ysePa8BvzuzMYYphm4=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=KPwerjJthObzWIoWvU7ke3Lk6zzqnTeFTAreAZsXE5F5wY7TO0lfvxigvAa/Z9KE9 2f5w4eNeQtUMnYQ+wbd3Zlze9slkXM3ufyu0pm9FEibXgQPZeEQJFk6I/eYdO3vfqP df2xXp0Kho9zDHzWXwEVqUTJ4C1rVak6He6iG02vqHHNo3al4VGuqjnMmI2UyAwjWX 3bYvpIMVglAFUn8Oy+2XyL6x42T0krGYwsBssjqUYI7u51UIUyqUV7A0ihUXd0dn2G 0j765ImwdRCiSviZVpPJlLmdrW26YjJsnluUxnFk0f1xuSpCGAfMN7YzbfGFkz7SyN 8DyNNJFU54vmg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QgWBj2VhSz9rxK for ; Tue, 13 Jun 2023 16:28:45 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:263323 Archived-At: Hi, 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? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at