From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 09:29:08 +0200 Message-ID: <86jzbuke2j.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22516"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70136@debbugs.gnu.org, arstoffel@gmail.com, monnier@iro.umontreal.ca, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 08:30:25 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 1tOXSr-0005ge-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 08:30:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOXSX-0000l6-Sl; Fri, 20 Dec 2024 02:30:06 -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 1tOXSU-0000jg-LW for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 02:30:02 -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 1tOXSU-0002t6-Aj for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 02:30:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=nlvyRGImi1UWuFA9ZTTOpl6+lB4O6MvfqpycjRMgupY=; b=REuQMQgslfCeiQhOEK5Lx8UflfOz0o8W0r4BmXASg0Ah/9e2dyPY7RXJEeFK9L3YLhN7SAuPHSuMKmOelywDRbFaO0VJjXo/EjaYSpbpwdACZhWpbxPoofvaHpEe3dWShXXQ2+FJIhpSRTofEcX9qJqqQI27KnPlBfzkKUfnIqNUrbn7tFF+LbkFNI4GkiAxsIOjcL5/4Ssqs/VtclkkD8LRAyJOZMEFDSFN5QzeSIxhlne5mb9ZquikzMYhGTEWoXvHkfb/84N1zCDgrtjml7euRC5im1ppmP/GZ05wUra+V1xObRYwSVgYlQVzUILt2jWTxZAS54dwWdDlYISQNg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOXSU-0000FS-5l for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 02:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2024 07:30: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.1734679762848 (code B ref 70136); Fri, 20 Dec 2024 07:30:02 +0000 Original-Received: (at 70136) by debbugs.gnu.org; 20 Dec 2024 07:29:22 +0000 Original-Received: from localhost ([127.0.0.1]:41455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOXRp-0000Dc-Iv for submit@debbugs.gnu.org; Fri, 20 Dec 2024 02:29:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOXRn-0000DL-74 for 70136@debbugs.gnu.org; Fri, 20 Dec 2024 02:29:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOXRf-0002mT-H6; Fri, 20 Dec 2024 02:29:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nlvyRGImi1UWuFA9ZTTOpl6+lB4O6MvfqpycjRMgupY=; b=NoSaF6hSPRoj ptQGMHyd6VEpV0bYEBDX6aVIJwjgJgQcR3YaXvkNJub42BUoyrIUq4rVj91iOsGxkGGeQElBG5nKy p+qJjolvnqsUxre8AHWzguSC+4Gr9Fx6pGHgNF24oAPzwAgb+2seCK3N4pdxdHHp+qKMZl+92h0+6 veLTeoZKketRfg2fLNUKlXj0mGFfiwd+veDBJcNvtU+og0nCbiWsOdNdaS5wITYUmrfCJQIZfaGn6 d3P7YVA1LYetShYv4iOsWL7k+PfkV7XSdnrFPkUs8Bn2Y7dgP/RIVczY5DMwziaqYN6zr/My6cU3O 3DfqIFsDV3wNSQAHuGnE7Q==; In-Reply-To: (message from Dmitry Gutov on Fri, 20 Dec 2024 05:09:24 +0200) 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:297430 Archived-At: > Date: Fri, 20 Dec 2024 05:09:24 +0200 > Cc: Eli Zaretskii , 70136@debbugs.gnu.org, > Stefan Monnier > From: Dmitry Gutov > > 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). I agreed with the change, provided it's opt-in. That was 7 months ago. > 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). Sorry, I don't understand what you are saying here. ("Emacs 24"? I thought we were discussing this for Emacs 30, for which it is now too late, and Emacs 31?)