From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57003: 28.1.90; Can local variables be loaded before loading major mode? Date: Sun, 30 Oct 2022 08:30:12 -0400 Message-ID: References: <87czdeoqy7.fsf@localhost> <87v8r54j3h.fsf@gnus.org> <875yj5xzou.fsf@localhost> <87h6zni1uc.fsf@localhost> <87pmeaauib.fsf@localhost> <875yg2arjv.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3386"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 57003@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 30 13:31:25 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 1op7TI-0000lC-JD for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Oct 2022 13:31:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1op7T0-0004cH-8Q; Sun, 30 Oct 2022 08:31: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 1op7Sw-0004bc-9y for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 08:31: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 1op7Sw-0005NI-21 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 08:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1op7Sv-0007Ux-Np for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 08:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2022 12:31:01 +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.166713302428778 (code B ref 57003); Sun, 30 Oct 2022 12:31:01 +0000 Original-Received: (at 57003) by debbugs.gnu.org; 30 Oct 2022 12:30:24 +0000 Original-Received: from localhost ([127.0.0.1]:37477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op7SJ-0007U5-VZ for submit@debbugs.gnu.org; Sun, 30 Oct 2022 08:30:24 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op7SH-0007Tt-UK for 57003@debbugs.gnu.org; Sun, 30 Oct 2022 08:30:23 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F30C544089C; Sun, 30 Oct 2022 08:30:15 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9906F44088B; Sun, 30 Oct 2022 08:30:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1667133014; bh=kR3l1WtCCs8H2+meH2saR/gCj8zCFZPNVF7rKCmr8lQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Xo3ClXwqnPlWTPX1JiP64T9ZNile4/AZTd5HOnCi0w1iXY/brM/ogGxa3/ot3I1EB 73L/32jYYl7Z/oAlvsfXqWZXNmEoVfs3+g1TvV5ytEQLKwvC0oUR9QtW3a/OkdhYgh DqTq97pFRdCH1ISF3DMkdy46QR/LNCS8BePzcpnC8IOHO0jet/zlNrgCoKUzKZaFTN 9gWh3OYfL51RyPcg93mqh0iEw5pQ8sbBij53h+xYgwQfyHtcronTco1QMid6VpIlDd ZGO0CEtc7wgJ+RsWQG6FoDz1O+VPWIkU6kfHkfKOL5CU1UnEyywz73QQWWzAWyrEeo VQbvQmThEn4zQ== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4AA20120E90; Sun, 30 Oct 2022 08:30:14 -0400 (EDT) In-Reply-To: <875yg2arjv.fsf@localhost> (Ihor Radchenko's message of "Sun, 30 Oct 2022 04:01:08 +0000") 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+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246615 Archived-At: Ihor Radchenko [2022-10-30 04:01:08] wrote: > 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=E9j=E0 vu": >> `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? Good question, maybe it should be amended to point to `after-change-major-mode-hook`? >> , 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? It's run after setting file-local vars, which themselves are set after running the mode hooks.