emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add a separate mode for .dir-locals.el


From: Eli Zaretskii
Subject: Re: Add a separate mode for .dir-locals.el
Date: Sun, 20 Oct 2019 08:45:35 +0300

> Cc: address@hidden, address@hidden, address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Sat, 19 Oct 2019 23:41:19 +0300
> 
> On 19.10.2019 17:14, Eli Zaretskii wrote:
> > In the latter case, we
> > will have to devise some way of turning on that new mode automatically
> > in most cases.
> 
> I don't think that should be a prerequisite.

Why not?  It would be very unusual and inconvenient for a major mode
to require that it be manually turned on to be useful.  Do we have any
other major mode that needs that?

> But even if we wanted that, do we have a lot of other similar files that 
> are created by the user, as opposed to being auto-generated? In the 
> latter case we can add a 'mode: elisp-data-mode' to the file while it's 
> generated with little effort.

If we can automatically generate the mode cookie, we can automatically
generate any other file-local variable we might need, like
'no-byte-compile: t' or the setting for an Xref backend.

I also am not sure that all the features that read these files will be
able to DTRT with (either ignore or act upon) file-locals or cookies.
At least some of them will probably have to be modified to be able to
do that.

That's why I said this issue needs to be investigated and the
conclusions posted and discussed, before we can design a coherent
feature to support such files.  Doing that in a hurry, based on a
single incident and only on some vague ideas what other aspects of
these files may need handling, doesn't sound wise to me, especially as
the rest of the issues, whatever they are, cannot be urgent, judging
by the lack of complaints.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]