GNU bug report logs -
#70105
30.0.50; Emacs should support EditorConfig out of the box
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Sun, 31 Mar 2024 13:45:01 UTC
Severity: normal
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #65 received at submit <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
>> I'm still working on the actual metadata of that branch, as well as
>> etc/NEWS and doc, but in the mean time maybe you could look at the code to
>> see if you have any objections there.
>
> OK, I have a first cut at the doc done.
> So, here's what I'm proposing, presented as a single diff.
> Some commit messages still need to be improved (and I just noticed that
> the files' copyright lines also need to be fixed), but other than that,
> I think it's about ready.
>
> Comments? Objections?
>
>
> Stefan
>
> diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
> index 6bf4cbe00df..5287a90bb71 100644
> --- a/doc/emacs/custom.texi
> +++ b/doc/emacs/custom.texi
> @@ -1550,6 +1550,41 @@ Directory Variables
> do not visit a file directly but perform work within a directory, such
> as Dired buffers (@pxref{Dired}).
>
> +@node EditorConfig support
> +@subsubsection Per-Directory Variables via EditorConfig
> +@cindex EditorConfig support
> +
> +The EditorConfig standard is an alternative to the @code{.dir-locals.el}
> +files, which can control only a very small number of variables, but
> +has the advantage of being editor-neutral. Those settings are stored in
> +files named @code{.editorconfig}.
> +
> +If you want Emacs to obey those settings, you need to enable
> +the @code{editorconfig-mode} minor mode. This is usually all that is
> +needed: when the mode is activated, Emacs will look for @code{.editorconfig}
> +files whenever a file is visited, just as it does for @code{.dir-locals.el}.
> +
> +When both @code{.editorconfig} and @code{.dir-locals.el} files are
> +encountered, the corresponding settings are combined, and in case there
> +is overlap, the settings coming from the nearest file take precedence.
What happens with both .dir-locals.el and .editorconfig present in the
current directory? What would be the "nearest file" in that case? (I'd
expect .dir-locals.el to override .editorconfig in that case, but there
are of course other possibilities.)
This bug report was last modified 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.