From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf Schlatte Newsgroups: gmane.emacs.bugs Subject: bug#70105: 30.0.50; Emacs should support EditorConfig out of the box Date: Wed, 19 Jun 2024 07:48:47 +0200 Message-ID: References: <867chibhqi.fsf@gnu.org> <86frtnd2e6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28234"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 70105@debbugs.gnu.org Cancel-Lock: sha1:1Nw4TSveiRqCYI+CJ3ILflDSlao= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 19 07:50:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sJoCw-0007As-U2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jun 2024 07:50:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJoCn-0005HE-G1; Wed, 19 Jun 2024 01:50:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJoCl-0005Gu-DB for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 01:49:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJoCl-0001WO-3v for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 01:49:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJoCo-0000LK-4O for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 01:50:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Rudolf Schlatte Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jun 2024 05:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70105 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17187761891284 (code B ref -1); Wed, 19 Jun 2024 05:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jun 2024 05:49:49 +0000 Original-Received: from localhost ([127.0.0.1]:33939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJoCb-0000Kc-9Y for submit@debbugs.gnu.org; Wed, 19 Jun 2024 01:49:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJoCZ-0000KV-Gb for submit@debbugs.gnu.org; Wed, 19 Jun 2024 01:49:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJoCV-0005Cg-R8 for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 01:49:43 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJoCT-0001UN-At for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 01:49:43 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1sJoCQ-0006Wd-5t for bug-gnu-emacs@gnu.org; Wed, 19 Jun 2024 07:49:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287464 Archived-At: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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.)