From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#38111: 27.0.50; globalized-minor-mode not enabled on get-buffer-create Date: Wed, 13 Nov 2019 23:12:29 +0200 Organization: LINKOV.NET Message-ID: <871rubmqf6.fsf@mail.linkov.net> References: <87sgmzqs5z.fsf@mail.linkov.net> <83y2wqd7ec.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="263548"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 38111@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 13 22:51:51 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iV0YJ-0015qR-46 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Nov 2019 22:51:51 +0100 Original-Received: from localhost ([::1]:51432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iV0YH-0003xm-Tq for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Nov 2019 16:51:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47645) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iV0Wf-0002Fg-Ls for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2019 16:50:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iV0Wc-00063P-Ry for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2019 16:50:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51443) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iV0Wb-00062Z-W9 for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2019 16:50:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iV0Wb-0007pz-S5 for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2019 16:50:05 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2019 21:50:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38111 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 38111-submit@debbugs.gnu.org id=B38111.157368180030070 (code B ref 38111); Wed, 13 Nov 2019 21:50:05 +0000 Original-Received: (at 38111) by debbugs.gnu.org; 13 Nov 2019 21:50:00 +0000 Original-Received: from localhost ([127.0.0.1]:60258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iV0WU-0007ou-Cj for submit@debbugs.gnu.org; Wed, 13 Nov 2019 16:50:00 -0500 Original-Received: from bongo.elm.relay.mailchannels.net ([23.83.212.21]:35328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iV0WR-0007oi-7b for 38111@debbugs.gnu.org; Wed, 13 Nov 2019 16:49:55 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2D92634232D; Wed, 13 Nov 2019 21:49:54 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com (100-96-187-103.trex.outbound.svc.cluster.local [100.96.187.103]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 92656342363; Wed, 13 Nov 2019 21:49:53 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 13 Nov 2019 21:49:54 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Stupid-Shrill: 580b699761b19412_1573681793847_404957779 X-MC-Loop-Signature: 1573681793847:197912859 X-MC-Ingress-Time: 1573681793847 Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a44.g.dreamhost.com (Postfix) with ESMTP id 5D38185225; Wed, 13 Nov 2019 13:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=6BmnB9kBIwVOtlMy/AZBLS0ireg=; b= JK+512utcZhZJ+UFA7Qso1DhW96LVt3xxp7Qw33VTwsT97K8xYk0HcXqGZrFcuY8 vYDBDw5ww9Cw5lmjKEksrpukMrh+pcFW9Q3VkdGfgykKWw0S+lKQ73iM22pp7rPp 5aS4Aeqry9LAncObc/koGocNyhv4drSK5v+slCS7HxQ= Original-Received: from mail.jurta.org (m91-129-102-1.cust.tele2.ee [91.129.102.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a44.g.dreamhost.com (Postfix) with ESMTPSA id CF39D85224; Wed, 13 Nov 2019 13:49:45 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a44 In-Reply-To: (Phil Sainty's message of "Wed, 13 Nov 2019 11:42:07 +1300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171510 Archived-At: >> Sounds like globalized-minor-mode machinery somehow doesn't support >> the latter method of creating a buffer? > > Yep, globalized modes use `after-change-major-mode-hook' to call the > buffer-local minor mode, and that hook is not triggered in these cases > because, although new buffers are in `fundamental-mode' by default, > the `fundamental-mode' function is not actually called, and so no mode > change occurs. > > I believe this has cropped up in past discussion, but I don't recall > where offhand. > > I agree that it's surprising when you are expecting the global mode(s) > to be enabled (I first realised it when attempting to use a globalized > mode for my custom key bindings, and discovering they were not being > enabled in various buffers). > > If this were changed then there *might* be undesirable consequences to > having lots of created-behind-the-scenes buffers suddenly doing things > they never did before. > > If the current behaviour is kept, the documentation for globalized > modes and for creating buffers should probably say something about the > matter. Thanks for referring to the documentation. It already explains this in (info "(elisp) Defining Minor Modes") -- Macro: define-globalized-minor-mode global-mode mode turn-on keyword-args... body... ... Globally enabling the mode also affects buffers subsequently created by visiting files, and buffers that use a major mode other than Fundamental mode; but it does not detect the creation of a new buffer in Fundamental mode.