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#57003: 28.1.90; Can local variables be loaded before loading major mode? Date: Sun, 30 Oct 2022 04:01:08 +0000 Message-ID: <875yg2arjv.fsf@localhost> References: <87czdeoqy7.fsf@localhost> <87v8r54j3h.fsf@gnus.org> <875yj5xzou.fsf@localhost> <87h6zni1uc.fsf@localhost> <87pmeaauib.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16924"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57003@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 30 05:01:15 2022 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 1oozVa-0004FA-S6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Oct 2022 05:01:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oozVS-00045R-1T; Sun, 30 Oct 2022 00:01:06 -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 1oozVO-0003uj-Rf for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 00:01:02 -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 1oozVO-0001lw-H2 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 00:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oozVO-0003dq-3p for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 00:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2022 04:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57003-submit@debbugs.gnu.org id=B57003.166710243813955 (code B ref 57003); Sun, 30 Oct 2022 04:01:02 +0000 Original-Received: (at 57003) by debbugs.gnu.org; 30 Oct 2022 04:00:38 +0000 Original-Received: from localhost ([127.0.0.1]:37003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oozUz-0003d1-Qb for submit@debbugs.gnu.org; Sun, 30 Oct 2022 00:00:38 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:34549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oozUu-0003cj-VH for 57003@debbugs.gnu.org; Sun, 30 Oct 2022 00:00:36 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3905F240027 for <57003@debbugs.gnu.org>; Sun, 30 Oct 2022 05:00:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667102427; bh=S4Z7xCa9klfb8cHEtD1e6KWomBctO1Q8bOAcgwcHo/c=; h=From:To:Cc:Subject:Date:From; b=JEhaIsLV1FAnyQG36lXGf3fmT0CCl8hlm/9IInOzoAmwt5BjFyuI72cAUGkDXfI98 P5cEGTUJQ73E4fdyD9482FYf3mxWWVhMdinFTcXqYktIO2XfngW46XLcYvYMB+r1ct KULXekt4Em4xou6HIQIbb+Ylfn10Qo0WrC7G+owcj0lhQugwtBswUe7GiCJlaiz/eu miNh/XiwRPLOd3/G3KvzGM5bYsFdKkv7A3TZEgjVsG0IRwM6ENENqO4zZX6dnJFEdC RDg12ywos1DN0WifY9V2yDUD0PI8poQDDS8BrMOmlMjCWe+TwgQXbX6CWEL+Q6I/U0 vzYvlZLnZ4g8w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N0My13yb7z9rxD; Sun, 30 Oct 2022 05:00:25 +0100 (CET) In-Reply-To: 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246583 Archived-At: Stefan Monnier writes: >> Not really, no. I have no doubt that there are various (in addition to >> the one you mention above). > > Looking at some of the related code, I had a feeling of "d=C3=A9j=C3=A0 v= u": > `hack-local-variables-hook' indeed suffers from various gotchas > (starting with the non-intuitive name and the fact that it only > applies to file-visiting buffers) Does it mean that "Major modes can use this to examine user-specified local variables in order to initialize other data structure based on them." statement in the docstring of `hack-local-variables-hook' should be amended? > , and I think my recommendation was out > of date: the better answer is to use `after-change-major-mode-hook` the > `:after-hook` thingy of `define-derived-mode`. Will it run before or after org-mode-hook? > And the remaining gotcha (for Org's support of Emacs-25) is that in > Emacs<26 these were run *before* `hack-local-variables` :-( This is not a problem. Org officially supports Emacs >=3D26. No more need to keep Emacs 25 compatibility. See https://orgmode.org/worg/org-maintenance.html#emacs-compatibility --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at