all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan Willcock <morgan@ice9.digital>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Lin Jian <me@linj.tech>,   emacs-orgmode@gnu.org
Subject: Re: [BUG] What about excluding .dir-locals.el from GNU ELPA tarball?
Date: Tue, 17 Sep 2024 19:13:52 +0100	[thread overview]
Message-ID: <874j6e87xb.fsf@ice9.digital> (raw)
In-Reply-To: <87zfo7mmjb.fsf@localhost> (Ihor Radchenko's message of "Mon, 16 Sep 2024 19:22:16 +0000")

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Ihor Radchenko <yantar92@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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-.dir-locals.el-Disable-compilation-of-.dir-locals.el.patch --]
[-- Type: text/x-diff, Size: 677 bytes --]

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


  reply	other threads:[~2024-09-17 18:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 23:07 [BUG] What about excluding .dir-locals.el from GNU ELPA tarball? Lin Jian
2024-09-15  8:23 ` Ihor Radchenko
2024-09-15 16:58   ` Morgan Willcock
2024-09-16 19:22     ` Ihor Radchenko
2024-09-17 18:13       ` Morgan Willcock [this message]
2024-09-22  8:14         ` Ihor Radchenko
2024-09-16  0:58   ` Lin Jian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874j6e87xb.fsf@ice9.digital \
    --to=morgan@ice9.digital \
    --cc=emacs-orgmode@gnu.org \
    --cc=me@linj.tech \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.