all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	Stefan Kangas <stefan@marxist.se>,
	Philip Kaludercic <philipk@posteo.net>,
	Robert Pluim <rpluim@gmail.com>
Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist
Date: Tue, 18 Oct 2022 09:25:26 -0400	[thread overview]
Message-ID: <jwvh701b78z.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86h701pp45.fsf@mail.linkov.net> (Juri Linkov's message of "Tue,  18 Oct 2022 10:28:27 +0300")

>> I think the above is better written:
>>
>>     ((nil
>>       (tab-width . 8)
>>       (sentence-end-double-space . t)
>>       (fill-column . 70)
>>       (emacs-lisp-docstring-fill-column . 65)
>>       (vc-git-annotate-switches . "-w")
>>       (bug-reference-url-format . "https://debbugs.gnu.org/%s")
>>       (diff-add-log-use-relative-names . t))
>>      (c-mode
>>       (c-file-style . "GNU")
>>       (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED" "UNINIT" "CALLBACK" "ALIGN_STACK"))
>>       (electric-quote-comment . nil)
>>       (electric-quote-string . nil)
>>       (indent-tabs-mode . t)
>>       (mode . bug-reference-prog)))
>
> So the dotted pair notation should be avoided only at the first level.

That's one way to look at it.
The other is that the dotted syntax doesn't make much sense when what
you have after the `.` is always a list.

> Then what about making it closer to the syntax of display-buffer-alist rules
> where CONDITION is passed to buffer-match-p that can match not only major-mode,
> but also a regular expression of a buffer name.

No opinion on that.  But indeed, it could be useful to specify a kind of
local `auto-mode-alist` additions.

>
>> Maybe something like:
>>
>>     (c-mode
>>      (:set c-file-style "GNU")
>>      (:set treesit-thing t)
>>      (:set odd-list (cons 3 odd-list))
>>      (:minor-mode indent-tabs-mode -1) ;; Disable
>>      (:minor-mode blink-parentheses-mode))
>
> The drawback of the current syntax is that `mode` and `eval`
> are used like variables, but really are keywords.  Using the
> keyword syntax `:` will help to resolve this ambiguity.

I think that's minor.  The fact that it only contains values rather than
(safely computable) expressions is the more problematic part.

> Also should file-local variables support the same :keyword syntax?

I don't think there's as much need for changes there, so I'd rather wait
for the dir-locals part to stabilize before trying to see if/how to move
it over to file-local variables.


        Stefan






  reply	other threads:[~2022-10-18 13:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13  9:05 bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled Philip Kaludercic
2022-10-13 14:20 ` Stefan Kangas
2022-10-13 14:32   ` Philip Kaludercic
2022-10-13 14:51     ` Stefan Kangas
2022-10-13 17:18   ` Juri Linkov
2022-10-13 19:11     ` Philip Kaludercic
2022-10-14  9:22     ` bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Stefan Kangas
2022-10-14 10:38       ` Eli Zaretskii
2022-10-14 12:36         ` Stefan Kangas
2022-10-14 11:25       ` Lars Ingebrigtsen
2022-10-14 12:36         ` Stefan Kangas
2022-10-14 13:04         ` Robert Pluim
2022-10-14 13:10           ` Lars Ingebrigtsen
2022-10-14 13:23             ` Robert Pluim
2022-10-14 13:29               ` Lars Ingebrigtsen
2022-10-14 13:41                 ` Robert Pluim
2022-10-14 15:13           ` Philip Kaludercic
2022-10-15  9:18             ` Lars Ingebrigtsen
2022-10-15  9:38               ` Philip Kaludercic
2022-10-15  9:42                 ` Lars Ingebrigtsen
2022-10-15 10:00                   ` Lars Ingebrigtsen
2022-10-15 11:35                   ` Philip Kaludercic
2022-10-15 13:56                     ` Lars Ingebrigtsen
2022-10-15 15:12                       ` Philip Kaludercic
2022-10-15 16:22                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16  8:39                         ` Lars Ingebrigtsen
2022-10-15 10:05                 ` Stefan Kangas
2022-10-15 15:19               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16  8:47                 ` Lars Ingebrigtsen
2022-10-16  9:34                   ` Philip Kaludercic
2022-10-16  9:43                     ` Lars Ingebrigtsen
2022-10-16 13:38                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16 13:44                     ` Lars Ingebrigtsen
2022-10-18 13:30                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-18  7:28                 ` Juri Linkov
2022-10-18 13:25                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-10-14 13:38         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-14 15:07       ` Philip Kaludercic
2022-10-14 16:32     ` bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 19:16       ` Juri Linkov
2022-10-16 13:17         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-13 18:02 ` Lars Ingebrigtsen
2022-10-14 18:14   ` Philip Kaludercic

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=jwvh701b78z.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58506@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    --cc=rpluim@gmail.com \
    --cc=stefan@marxist.se \
    /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.