Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist

From: Philip Kaludercic <[email-masked]>
Date: Fri, 14 Oct 2022 15:13:42 +0000

Robert Pluim <[email-masked]> writes:

>>>>>> On Fri, 14 Oct 2022 13:25:22 +0200, Lars Ingebrigtsen <[email-masked]> said:
>
>     Lars> So if we introduce .dir-locals.eld, we should take the opportunity to
>     Lars> add a brand new, sensible, extensible syntax, too.
>
> We could use an almost syntax-less language with lots of structuring
> parentheses (LOSP for short). And weʼd have to call the file
> 'please-pwn-my-Emacs.el'
>
> Seriously, having files popping up safe-variable warnings is scary
> enough already, do we really need to complicate things by adding
> yet-another not-quite-lisp syntax? Is the support for `eval' in
> .dir-locals.el not enough?

What I would like to see if some kind of extensibility in the syntax.
Perhaps using methods.  I have often seen projects using `eval' just
because the options they are setting are not trivial assignments, but
conventional modifications like prepending an item to a list or setting
a symbol property (check out the .dir-locals.el for Guix if you want to
see a massive "Do you want to accept all these variables" prompt).

> Robert