From unknown Thu Jun 19 14:12:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21507 <21507@debbugs.gnu.org> To: bug#21507 <21507@debbugs.gnu.org> Subject: Status: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers Reply-To: bug#21507 <21507@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:12:35 +0000 retitle 21507 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental m= ode buffers reassign 21507 emacs submitter 21507 Kaushal Modi severity 21507 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 17 12:16:37 2015 Received: (at submit) by debbugs.gnu.org; 17 Sep 2015 16:16:37 +0000 Received: from localhost ([127.0.0.1]:36273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZcbrQ-0001Ky-I9 for submit@debbugs.gnu.org; Thu, 17 Sep 2015 12:16:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44331) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZcbrO-0001Kq-EC for submit@debbugs.gnu.org; Thu, 17 Sep 2015 12:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcbrM-00010u-Nc for submit@debbugs.gnu.org; Thu, 17 Sep 2015 12:16:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_FONT_FACE_BAD,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcbrM-00010j-Ko for submit@debbugs.gnu.org; Thu, 17 Sep 2015 12:16:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcbrL-0007Di-1H for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2015 12:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcbrG-0000w8-Jg for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2015 12:16:30 -0400 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:35942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcbrG-0000vn-E2 for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2015 12:16:26 -0400 Received: by obqa2 with SMTP id a2so17236307obq.3 for ; Thu, 17 Sep 2015 09:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=xwGj8CoWDTUre0N7Z1VFLQPIwNowku2Pb2HsrNmDirw=; b=kJ+vg+U/fC3JM/aG2g2w678XiJ3RTnJZtRu9ZdtU9DUHqj2GWNZ9aGN37NYGrPeDx1 Pa+8o11mUaQJfYx1Gr2zNN4k/g8iYe6mlj3Z+LsRS46wy0V0skfgb35omAfmPFGfdknC 6NT9IyAJv2wfyU4eYdVnXLx25dXwx5jL8JQUqxBNc9lp1XAE38c7GfBcf8xZCRXk4tfu 4rks4MnPgWkxhxNGZrMuq8W03qWXUnvQbPzICtLWbRtaGODWLxBLH6Vji4xmqbnIstbl d1U7LmkjfzAn/wepyM63Uk648E4Uvs13oWrfOssEGTXKz7vqKOnVgLADEnOA9pV+ZDER aOAQ== X-Received: by 10.182.240.135 with SMTP id wa7mr30792131obc.63.1442506585583; Thu, 17 Sep 2015 09:16:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.172.205 with HTTP; Thu, 17 Sep 2015 09:15:46 -0700 (PDT) From: Kaushal Modi Date: Thu, 17 Sep 2015 12:15:46 -0400 Message-ID: Subject: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers To: "bug-gnu-emacs@gnu.org" Content-Type: multipart/alternative; boundary=001a11c1dfc09ebdac051ff3bcec X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: submit Cc: Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) --001a11c1dfc09ebdac051ff3bcec Content-Type: text/plain; charset=UTF-8 Hi, I recently was debugging an issue with my globalized minor mode and auto generated Fundamental mode buffers created by different pacakages. I brought up that problem over at emacs.SE: http://emacs.stackexchange.com/q/16693/115 The below code summarizes what I learnt. The code can be eval'ed in an emacs -Q session to recreate the issue I am seeing. Please review the below code, eval and run it and proceed with my explanation after the code. ;; my1-mode - init value nil - enabled using its global variant (define-minor-mode my1-mode :init-value nil :lighter " my1") (defun turn-on-my1-mode () (my1-mode 1)) (define-globalized-minor-mode global-my1-mode my1-mode turn-on-my1-mode) (global-my1-mode) ;; my2-mode - init value nil - enabled using setq-default (define-minor-mode my2-mode :init-value nil :lighter " my2") (defun turn-on-my2-mode () (my2-mode 1)) (define-globalized-minor-mode global-my2-mode my2-mode turn-on-my2-mode) (setq-default my2-mode t) ;; my3-mode - init value t (so enabled by default) (define-minor-mode my3-mode :init-value t :lighter " my3") ;; Now call `get-buffer-create' that creates a buffer with Fundamental major mode (with-current-buffer (get-buffer-create "*temp*") (insert "Hello")) (split-window-right) (switch-to-buffer "*temp*") --- My minor mode is of the type my1-mode above where the init value is nil but I enable it in my config using (global-my1-mode). The global enabling of my1-mode is seen everywhere, all the newly created buffers except for the cases where a package would create some sort of temp buffer using `get-buffer-create'. Such buffers would be in Fundamental mode by default and I noticed that the (global-my1-mode) had no effect on those buffers. If I tweak my minor mode to be of my2-mode (change the init value to t)or my3-mode (force the init value to t using setq-default) types above, then my minor mode gets enabled globally in true sense (even in buffers created using get-create-buffer). In essence, setting the init value as t is not the same as enabling a globalized minor mode. Is this by design? -- Kaushal Modi --001a11c1dfc09ebdac051ff3bcec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I recently was debugging an issue wi= th my globalized minor mode and auto generated Fundamental mode buffers cre= ated by different pacakages. I brought up that problem over at emacs.SE: http://emacs.stackexch= ange.com/q/16693/115

The below code summarizes what I learnt. The code can be e= val'ed in an emacs -Q session to recreate the issue I am seeing.=C2=A0<= /div>

Please r= eview the below code, eval and run it and proceed with my explanation after= the code.

;; my1-mode - init value nil - enabled = using its global variant
(define-minor-mode my1-mode
=C2=A0 :init-value nil
=C2=A0 :lighter " = my1")
(defun turn-on-my1-mode () (my1-mode 1))
(define-globalized-minor-mode global-my1-mode my1-mode turn-on= -my1-mode)
(global-my1-mode)

;; my2-mode - init value nil - enabled using setq-default
(define-minor-mode my2-mode
=C2=A0 :init-value= nil
=C2=A0 :lighter " my2")
(d= efun turn-on-my2-mode () (my2-mode 1))
(define-globalized-= minor-mode global-my2-mode my2-mode turn-on-my2-mode)
(set= q-default my2-mode t)
<= font face=3D"trebuchet ms, sans-serif">
;; my3-mode - = init value t (so enabled by default)
(define-minor-mode my= 3-mode
=C2=A0 :init-value t
=C2=A0 :light= er " my3")

;; Now call `ge= t-buffer-create' that creates a buffer with Fundamental major mode
(with-current-buffer (get-buffer-create "*temp*")
=C2=A0 (insert "Hello"))
(split-w= indow-right)
(switch-to-buffer "*temp*")<= /div>


-= --

My mi= nor mode is of the type my1-mode above where the init value is nil but I en= able it in my config using (global-my1-mode).
The global enabling of my1-mode is se= en everywhere, all the newly created buffers except for the cases where a p= ackage would create some sort of temp buffer using `get-buffer-create'.= Such buffers would be in Fundamental mode by default and I noticed that th= e (global-my1-mode) had no effect on those buffers.

If I tweak my minor mode to be = of my2-mode (change the init value to t)or my3-mode (force the init value t= o t using setq-default) types above, then my minor mode gets enabled global= ly in true sense (even in buffers created using get-create-buffer).

In essence, set= ting the init value as t is not the same as enabling a globalized minor mod= e.=C2=A0

Is this by design?=C2=A0



--
Kaushal Modi
<= /div>
--001a11c1dfc09ebdac051ff3bcec-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 19:28:59 2020 Received: (at 21507) by debbugs.gnu.org; 28 Dec 2020 00:28:59 +0000 Received: from localhost ([127.0.0.1]:33881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktgPD-0004ch-7i for submit@debbugs.gnu.org; Sun, 27 Dec 2020 19:28:59 -0500 Received: from quimby.gnus.org ([95.216.78.240]:37218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktgPB-0004cR-Go for 21507@debbugs.gnu.org; Sun, 27 Dec 2020 19:28:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J+vj9EOrXSMGT3td+ST38D/mUnHsU046Zm5swrE8Ze4=; b=JVDvkOTAgIh+8HmXlKTrSlKr31 xJ1PgNxhojuJR7qFQ9RqBGPyhSjM1cttjR7e2JFWWE9FuKxhK04G1MFdcbyZsZ202Np3EVdxwSQ99 pgA3K7MXndDF0ZTjDD7gws5OQDJwqycYgX9uDCENsmFTjEk1ceHHDEqptkI4E44pBQkA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktgOz-0006E9-UT; Mon, 28 Dec 2020 01:28:50 +0100 From: Lars Ingebrigtsen To: Kaushal Modi Subject: Re: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers References: X-Now-Playing: Joy Division's _Closer_: "Heart And Soul" Date: Mon, 28 Dec 2020 01:28:44 +0100 In-Reply-To: (Kaushal Modi's message of "Thu, 17 Sep 2015 12:15:46 -0400") Message-ID: <87h7o66af7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Kaushal Modi writes: > Please review the below code, eval and run it and proceed with my explanation > after the code. It had to be adjusted a bit: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21507 Cc: 21507@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Kaushal Modi writes: > Please review the below code, eval and run it and proceed with my explanation > after the code. It had to be adjusted a bit: ;; my1-mode - init value nil - enabled using its global variant (define-minor-mode my1-mode "" :init-value nil :lighter " my1") (defun turn-on-my1-mode () (my1-mode 1)) (define-globalized-minor-mode global-my1-mode my1-mode turn-on-my1-mode) (global-my1-mode) ;; my2-mode - init value nil - enabled using setq-default (define-minor-mode my2-mode "" :init-value nil :lighter " my2") (defun turn-on-my2-mode () (my2-mode 1)) (define-globalized-minor-mode global-my2-mode my2-mode turn-on-my2-mode) (setq-default my2-mode t) ;; my3-mode - init value t (so enabled by default) (define-minor-mode my3-mode "" :init-value t :lighter " my3") > My minor mode is of the type my1-mode above where the init value is > nil but I enable it in my config using (global-my1-mode). > > The global enabling of my1-mode is seen everywhere, all the newly > created buffers except for the cases where a package would create some > sort of temp buffer using `get-buffer-create'. Such buffers would be > in Fundamental mode by default and I noticed that the > (global-my1-mode) had no effect on those buffers. I'm still seeing this behaviour in Emacs 28. > If I tweak my minor mode to be of my2-mode (change the init value to > t)or my3-mode (force the init value to t using setq-default) types > above, then my minor mode gets enabled globally in true sense (even in > buffers created using get-create-buffer). > > In essence, setting the init value as t is not the same as enabling a > globalized minor mode. > > Is this by design? Anybody know? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed May 26 18:33:24 2021 Received: (at 21507) by debbugs.gnu.org; 26 May 2021 22:33:24 +0000 Received: from localhost ([127.0.0.1]:50170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm25c-0001nO-K7 for submit@debbugs.gnu.org; Wed, 26 May 2021 18:33:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm25a-0001nA-VP for 21507@debbugs.gnu.org; Wed, 26 May 2021 18:33:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yEsz6CBjg+Aqm7Lvl5SdQ6SlBLOdAno7WwL+Jh2i334=; b=nbSCBMeTEwohg/Vm1q2BvaTak5 UI54QgMBvv6TFdZY8jTxWKUiGuiKJuI3PRdMSeQTCCLzgPmxZ725SnupVOvG1cetZ0vHGnI70EK+u GQy593o6e9SuwltMcNjIZNCraDWHRMyYYoqy+vhGoXSejeTvjsASycvG9V4MkGASsMyc=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lm25O-0003ya-Qy; Thu, 27 May 2021 00:33:13 +0200 From: Lars Ingebrigtsen To: Kaushal Modi Subject: Re: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers References: <87h7o66af7.fsf@gnus.org> X-Now-Playing: Tuxedomoon's _Live At The Palms (1978)_: "Litebulb Overkill" Date: Thu, 27 May 2021 00:33:10 +0200 In-Reply-To: <87h7o66af7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 28 Dec 2020 01:28:44 +0100") Message-ID: <87wnrl86s9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: >> If I tweak my minor mode to be of my2-mode (change the init value to >> t)or my3-mode (force the init value to t using setq-default) types >> above, then my minor mode gets enabled globally in true [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21507 Cc: 21507@debbugs.gnu.org, Stefan Monnier , Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: >> If I tweak my minor mode to be of my2-mode (change the init value to >> t)or my3-mode (force the init value to t using setq-default) types >> above, then my minor mode gets enabled globally in true sense (even in >> buffers created using get-create-buffer). >> >> In essence, setting the init value as t is not the same as enabling a >> globalized minor mode. >> >> Is this by design? > > Anybody know? Perhaps Stefan does; added to the CCs. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed May 26 18:41:17 2021 Received: (at 21507) by debbugs.gnu.org; 26 May 2021 22:41:18 +0000 Received: from localhost ([127.0.0.1]:50206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm2DF-000223-NJ for submit@debbugs.gnu.org; Wed, 26 May 2021 18:41:17 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lm2DD-00021q-LR for 21507@debbugs.gnu.org; Wed, 26 May 2021 18:41:16 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2E73B80820; Wed, 26 May 2021 18:41:10 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CF80B80420; Wed, 26 May 2021 18:41:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1622068868; bh=OoKDedXszoL9pEC982nvDyiPH4yOc+7x6km3FZ8jGNA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lL6PLeR0HAtHh0PvTJ4K5/J86+Tds4apZxK46Mr7oK7srW1bDFR5T6ghWI0Zpw1A8 uB4OEO8TFt/hdVXZy197nzwhFXF/SjemPxaDwbHX480a9H4iWU/+NrIlEh0HhfSlBl lgpXg2ZSdmV2WoqH2SP3kT68VmHPbuxmc7jTeoG0I98kgqid0XuitYbdnR0bLC1Zbw THjRBtIt3n/JK0q89riIUZ8kqydQ1kMK/x27fOtoj8a4/ksiWSLJlJGFdZEOScqf7W cWqpQtG4SXnveVJlmpt1mHbOmSzzWjtKosEE7WGHCSPOSLWStlxBu7rvbOSsqVIkWQ gZ/gTfOeM/aPA== Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 914DA1209D2; Wed, 26 May 2021 18:41:08 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers Message-ID: References: <87h7o66af7.fsf@gnus.org> <87wnrl86s9.fsf@gnus.org> Date: Wed, 26 May 2021 18:41:07 -0400 In-Reply-To: <87wnrl86s9.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 27 May 2021 00:33:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.098 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21507 Cc: 21507@debbugs.gnu.org, Drew Adams , Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2021-05-27 00:33:10] wrote: > Lars Ingebrigtsen writes: >>> If I tweak my minor mode to be of my2-mode (change the init value to >>> t)or my3-mode (force the init value to t using setq-default) types >>> above, then my minor mode gets enabled globally in true sense (even in >>> buffers created using get-create-buffer). >>> >>> In essence, setting the init value as t is not the same as enabling a >>> globalized minor mode. >>> >>> Is this by design? >> Anybody know? > Perhaps Stefan does; added to the CCs. Maybe I misunderstand the question, but a minor mode is defined by a function that can used to turn it ON/OFF and a variable that lets you know where it's ON or OFF. Setting the var directly rather than via the minor mode function just breaks the abstraction and its behavior is thus "defined by implementation" and subject to change. Similarly `:init-value` is used to tell Emacs what is the initial state, rather than to set this initial state. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu May 27 19:37:44 2021 Received: (at 21507) by debbugs.gnu.org; 27 May 2021 23:37:44 +0000 Received: from localhost ([127.0.0.1]:53080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmPZQ-0002ci-LM for submit@debbugs.gnu.org; Thu, 27 May 2021 19:37:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmPZP-0002cS-Db for 21507@debbugs.gnu.org; Thu, 27 May 2021 19:37:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KU3mu6Ql8tP/BXWqEo54YiR2CJVTRaPihHccCBIKtsA=; b=VFBC9yfp9elCatnRzZSq588D/d CZlyF/tixXhrj5FuBPhN1U6VaLr7QsVtfV67a/gQYI/pgTaCPzCHTKqEiFQgEWnSotJEb4R7/CfCS CkE3AEh7bGz/Ds8r2ou85t+sUfBYRCmSpKqojk6tkmOCvrLBgycUke5jS16vd6Gdqv3E=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmPZF-0001uX-8M; Fri, 28 May 2021 01:37:35 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers References: <87h7o66af7.fsf@gnus.org> <87wnrl86s9.fsf@gnus.org> X-Now-Playing: The Residents's _The King & Eye: RMX_: "A Fool such as I" Date: Fri, 28 May 2021 01:37:32 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 26 May 2021 18:41:07 -0400") Message-ID: <871r9r4ukj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > Setting the var directly rather than via the minor mode function just > breaks the abstraction and its behavior is thus "defined by > implementation" and subject to change. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21507 Cc: 21507@debbugs.gnu.org, Drew Adams , Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > Setting the var directly rather than via the minor mode function just > breaks the abstraction and its behavior is thus "defined by > implementation" and subject to change. Yes, indeed. So this is working as it should, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu May 27 19:37:51 2021 Received: (at control) by debbugs.gnu.org; 27 May 2021 23:37:51 +0000 Received: from localhost ([127.0.0.1]:53083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmPZW-0002d1-S7 for submit@debbugs.gnu.org; Thu, 27 May 2021 19:37:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmPZV-0002ch-Fy for control@debbugs.gnu.org; Thu, 27 May 2021 19:37:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lBO6gji/l+M4q5HVpO1WPfkn0lyu4bsKTRuBDeM96QY=; b=YVkjwekakN0rK6escA0z8QUh4E aQzrNw6EqvFscbcaTD44eZPTP3zwXujxU7cp9ImxhpY3BgbYw/Zryo71/zVkE68Y5G2oOwIuzGzDQ PZ7T0Tx6cv7mcX07k3c1yNyDmNi/US6R9QFMzzpMcnA8ZkyJXFiVC1FUz230OZRkV3kw=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmPZO-0001uk-1O for control@debbugs.gnu.org; Fri, 28 May 2021 01:37:43 +0200 Date: Fri, 28 May 2021 01:37:41 +0200 Message-Id: <87zgwf3fzu.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21507 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 21507 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 21507 quit From unknown Thu Jun 19 14:12:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 Jun 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator