Ihor Radchenko <yanta...@posteo.net> writes: >> I believe it is up to the file to opt-out of compilation. > > That's true, but .dir-locals is a special file. So, I expected Emacs to > treat it specially during compilation as well. To not break old, > no-longer-maintained packages, if nothing.
I guess the counter argument would be that, if this file doesn't need to compiled, and the error is that compilation of this file fails, then it isn't a critical error. >> If the file is created with add-dir-local-variable there is a boiler >> plate header inserted which opts out: >> >> ;;; Directory Local Variables -*- no-byte-compile: t -*- >> ;;; For more information see (info "(emacs) Directory Variables") >> ... >> ... The solution would be to add >> the missing header to the .dir-locals.el file. > > I do not see any downside of adding this to .dir-locals.el file. > Would you mind submitting a patch? I've attached a patch. (To be fully transparent, I have not verified that applying the patch will prevent errors during native compilation of the ELPA package, but I am pretty confident that the change is a correct one.) -- Morgan Willcock
>From 18e55680191e2c803b731750643d3e854134f1a5 Mon Sep 17 00:00:00 2001 From: Morgan Willcock <morgan@ice9.digital> Date: Tue, 17 Sep 2024 18:09:08 +0100 Subject: [PATCH] .dir-locals.el: Disable compilation of .dir-locals.el * .dir-locals.el (org-mode): Add 'no-byte-compile'. --- .dir-locals.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index 9df10dfed..551a831f7 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,4 +1,4 @@ -;;; Directory Local Variables +;;; Directory Local Variables -*- no-byte-compile: t -*- ;;; For more information see (info "(emacs) Directory Variables") ((nil -- 2.39.5