Subject: Re: bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hack-dir-local-variables-non-file-buffer

From: Stefan Monnier <[email-masked]>
Date: Tue, 16 Apr 2024 17:49:08 -0400

> You are entitled to your opinions, but this is clearly a change in
> behavior that will affect a lot of users (since compilation-mode and
> its descendants are very popular and widely used).  Therefore, I don't
> understand why you need concrete examples: the issue is crystal clear
> just by thinking about it.

FWIW, back in 2010 (commit 8117868f0ce6) when we added support for
dir-locals to non-file buffers, we did it without even a config var to
turn it off.

AFAICT the `dir-locals.el` format should already be sufficiently
flexible to make it easy for users annoyed by the new behavior to
recover the old behavior (without affecting older Emacsen).

I think we should make an effort to enable dir-locals in as many buffers
as makes sense (but that can't be all buffers, because many buffers
aren't really related to any particular place in the file system, in
which case using the dir-locals setting of the directory that happens to
be current when the buffer was created is too arbitrary).

        Stefan