GNU bug report logs - #38111
27.0.50; globalized-minor-mode not enabled on get-buffer-create

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 7 Nov 2019 22:59:02 UTC

Severity: normal

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38111 <at> debbugs.gnu.org
Subject: Re: bug#38111: 27.0.50; globalized-minor-mode not enabled on
 get-buffer-create
Date: Tue, 12 Nov 2019 22:33:35 +0200
tags 38111 + notabug
close 38111
quit

>> This looks like a bug.  I found this issue while using global-tab-line-mode,
>> but to confirm that it's unrelated to tab-line, this bug report uses another
>> globalized minor-mode global-display-fill-column-indicator-mode:
>>
>> 0. emacs -Q
>> 1. M-x global-display-fill-column-indicator-mode RET
>> 2. C-x b test1 RET
>> 3. RET  ;; this inserts newline to show column indicator
>>         ;; that confirms this mode is enabled in the buffer
>>
>> 4. M-: (switch-to-buffer (get-buffer-create "test2")) RET
>> 5. RET  ;; no column indicator, mode not enabled
>> 6. C-h v display-fill-column-indicator-mode RET
>>    ;; confirms its value is nil
>
> Sounds like globalized-minor-mode machinery sdomehow doesn't support
> the latter method of creating a buffer?  Does the turn-on function of
> the mode get called in that scenario?

'C-x b' (switch-to-buffer) uses ‘window-normalize-buffer-to-switch-to’
to call after 'get-buffer-create' explicitly:

  (set-buffer-major-mode buffer)

It seems this is not a problem in practice, since callers
can add set-buffer-major-mode, so closing.




This bug report was last modified 4 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.