From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hack-dir-local-variables-non-file-buffer Date: Fri, 20 Dec 2024 05:09:24 +0200 Message-ID: References: <87zfuc48d5.fsf@gmail.com> <86msqc9dsa.fsf@gnu.org> <874jcjeuac.fsf@gmail.com> <86edbnajfp.fsf@gnu.org> <87mspwcn0f.fsf_-_@gmail.com> <86le4s7n65.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33289"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , 70136@debbugs.gnu.org, Stefan Monnier To: Juri Linkov , Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 04:10:26 2024 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 1tOTPF-0008SP-9B for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 04:10:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOTOv-0007n4-PA; Thu, 19 Dec 2024 22:10:05 -0500 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 1tOTOt-0007kj-6n for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 22:10:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOTOs-0005P9-GU for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 22:10:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=uB/n57NfNNGhqVx5Zve+5KtBvkgZhA2wruN4obs8vBU=; b=gGf9Q0kV/7iVHcvvrm0JoVZFixL+do8eihjQ9GxjJkDFf9ctQMOFjd7BrBTHcRX/KQC+KADvGre4CoVGeeLK6b4cPnA8AX4q9a8Oi80Rh5Cc9T959Ik4iD3Bs3KNA5IYaK+cUcXLWqwrwOP4IhY3gQZ7qniyhgSpm2FWd0b6TBHM6ugg3QLmUYlNkr192uatQ+bzr1jewT+3gKAyPIY8H4PW4S9p+w2n1oCWYaYowPNIixW7i3pgoqjnXDxi7+9zXIvVQhJ1hagDCprFcNBGqNMnXpl0dfWOIjaN3AbF45cOFLkxyMSlzM1OSg/4GuwMcXzatDcrHZDqdp0Shs30Xw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOTOs-0004Xz-7R for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2024 22:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2024 03:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70136 X-GNU-PR-Package: emacs Original-Received: via spool by 70136-submit@debbugs.gnu.org id=B70136.173466417617437 (code B ref 70136); Fri, 20 Dec 2024 03:10:02 +0000 Original-Received: (at 70136) by debbugs.gnu.org; 20 Dec 2024 03:09:36 +0000 Original-Received: from localhost ([127.0.0.1]:40913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOTOS-0004XA-Bk for submit@debbugs.gnu.org; Thu, 19 Dec 2024 22:09:36 -0500 Original-Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]:40103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOTOQ-0004Ww-UE for 70136@debbugs.gnu.org; Thu, 19 Dec 2024 22:09:35 -0500 Original-Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 104D81140191; Thu, 19 Dec 2024 22:09:29 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 19 Dec 2024 22:09:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1734664168; x=1734750568; bh=uB/n57NfNNGhqVx5Zve+5KtBvkgZhA2wruN4obs8vBU=; b= WyNia305OaMtcds1M72MDAkC7KHGgmOFwJej1Mfy9mIHr0FIJeKXNfft1zSd5BqI AFSkuLVdBFEtjOZroA7YianqrMiyk/JjFfB7ZCljJiu0jx+CdYR3gVWbJeNUQd7S AUUtRuXETD+DBx3NaULU18C2pd0iSVZFef2q9SZkIFMrgvvAU4lu5Z/t81r6Sl5a ciGsntGan8VYugda3szPWhvr8atrUZNGA5kDui/lQUHAAJ0BrXm4Vi6R1kVqEmgT T2IpvDgddXi0JJtQ58qsCgvzbuK4C7HLAOf31MgeJg6Xg5Ar1A62iRYsTYgttVB2 jlgwCSt2O8OjtKT70ohjBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734664168; x= 1734750568; bh=uB/n57NfNNGhqVx5Zve+5KtBvkgZhA2wruN4obs8vBU=; b=W kzVXtPjWisjoDJ6yUqaqF2BGJaIfAgDzlWh8hPuuLselcQLUtnYhXFVMW1vq+Uul vcg3JEa1ghZL2Y7qDN4HuOIvZxhKZ2xcwGY2F6OAYrKcyw3t58k+Ew04lDzqld17 7Wsm8K5FwVkHutLPeUdhpsjuHbQWHpQQbfcxSYZn3p61ByqqPt7S8a7C2H3WdYqz k0DWjDVGpbFjaIFUODb8LyJVjPxfSKDIPQRZkshJ3TJ6EdyaWaUSqYwH59aUN+uQ LKpYCtVVRPwRvBA9RiI1wmgpR8O+5TqGRYXYg28TbImMt34jue0CgYol3dwya19n 9VWYnHndka5kqGh+ElY7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtuddgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd hnvghtpdhrtghpthhtoheprghrshhtohhffhgvlhesghhmrghilhdrtghomhdprhgtphht thhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopeejtddufeeiseguvggssghugh hsrdhgnhhurdhorhhgpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhr vggrlhdrtggr X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Dec 2024 22:09:26 -0500 (EST) Content-Language: en-US In-Reply-To: <86le4s7n65.fsf@mail.linkov.net> 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297419 Archived-At: On 02/05/2024 09:17, Juri Linkov wrote: >> @@ -2372,6 +2363,11 @@ compilation-mode >> ;; some other input event happens. >> (setq-local jit-lock-defer-time nil) >> (setq buffer-read-only t) >> + (unless (buffer-file-name) >> + (let ((sym (make-symbol "hack-dir-local-variables-non-file-buffer"))) >> + (set sym #'hack-dir-local-variables-non-file-buffer) >> + ;; Ensure hack-dir-locals is called only after a derived mode is set. >> + (push sym delayed-mode-hooks))) >> (run-mode-hooks 'compilation-mode-hook)) > Thanks for the patch. I confirm it completely fixes the bug > reported at the end of bug#68570. I'd like to express my support for the change as well (got here from bug#74631). When we added it to some modes in Emacs 24, the announcement had what seems like advice to call this functions in more others (see the corresponding NEWS). The current opt-out options seem sufficient IMHO (the Compilation mode, they would also include setting enable-dir-local-variables to nil locally in the mode hook).