All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Federico Vaga <federico.vaga@vaga.pv.it>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, "Geyslan G . Bem" <geyslan@gmail.com>,
	Tiago Natel de Moura <tiago4orion@gmail.com>,
	Alison Chaiken <alison_chaiken@mentor.com>,
	Joe Perches <joe@perches.com>, Zhang Le <r0bertz@gentoo.org>,
	Li Yang <leo@zh-kernel.org>
Subject: Re: [PATCH] Documentation/CodingStyle: Move emacs settings into .dir-locals.el
Date: Fri, 04 Jan 2019 08:32:38 -0800	[thread overview]
Message-ID: <1546619558.163063.34.camel@acm.org> (raw)
In-Reply-To: <4009470.9o5kGc7Prg@harkonnen>

On Fri, 2019-01-04 at 10:44 +0100, Federico Vaga wrote:
> On Friday, January 4, 2019 1:39:57 AM CET Bart Van Assche wrote:
> > For new kernel developers who use emacs it is tedious to follow the
> > instructions in Documentation/process/coding-style.rst for configuring
> > emacs. Make it easier for emacs users by moving these settings into the
> > top-level .dir-locals.el file. Emacs supports directory-local variables
> > since version 23.1, released in 2009. See also
> > https://lists.gnu.org/archive/html/info-gnu-emacs/2009-07/msg00000.html
> > 
> > The settings in .dir-locals.el are not identical to those in
> > Documentation/process/coding-style.rst. The most important difference
> > is that "(arglist-cont-nonempty c-lineup-gcc-asm-reg
> > c-lineup-arglist-tabs-only)" (which is not a valid alist) has been
> > changed into "(arglist-cont-nonempty . c-lineup-arglist)". I have
> > verified with several large and nontrivial kernel source files that
> > the settings in .dir-locals.el format code according to what checkpatch
> > expects.
> 
> Isn't it better if we collect such configuration files into a dedicated 
> directory (where exactly?) instead of putting them in the top-level one? Then, 
> the developer has to copy/link the configuration file into the top-level 
> directory.

I don't think so. The reason we have the checkpatch script and the
coding-style.rst document in the kernel tree is to promote coding style
uniformity. Placing the .dir-locals.el at the top level serves the same
purpose. Additionally, if the .dir-locals.el file is not at the top level
many kernel developers will overlook it.

> If we accept emacs configuration files in the top-level directory we will have 
> to accept also the ones from other editors (of course, when they support local 
> configurations).

I am aware of this and I'm fine with this.

> In addition, probably, there are people who do not want to use local
> configurations.

I expect that only a minority will not want to use the .dir-locals.el file.
Anyone who wants to override any of the settings from .dir-locals.el
can do that by using one of the methods explained in the emacs manual, e.g.
by adding a .dir-locals-2.el file. See also
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html.

> > The Italian and Chinese translations of the modified paragraphs have
> > been generated by Google Translate.
> 
> Thanks for the Italian translation but unfortunately Google Translate is not 
> up to the task :) Any one can understand the translation that Google did but 
> it is incorrect.
> 
> I can give you a correct translation once it has been agreed on the English 
> version.

Thank you for this offer. I will leave out the Italian translation.

Bart.

  parent reply	other threads:[~2019-01-04 16:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04  0:39 [PATCH] Documentation/CodingStyle: Move emacs settings into .dir-locals.el Bart Van Assche
2019-01-04  2:12 ` Matthew Wilcox
2019-01-04 16:06   ` Bart Van Assche
2019-01-04  9:44 ` Federico Vaga
2019-01-04 11:18   ` Jani Nikula
2019-01-04 16:40     ` Bart Van Assche
2019-01-07 10:29       ` Jani Nikula
2019-01-04 16:32   ` Bart Van Assche [this message]
2019-01-04 16:41     ` Jonathan Corbet
2019-01-04 18:26       ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2019-01-04 21:08 [PATCH] Documentation/CodingStyle: Use directory-local variables for emacs Bart Van Assche
2019-01-04 21:08 ` [PATCH] Documentation/CodingStyle: Move emacs settings into .dir-locals.el Bart Van Assche
2019-01-04 21:11   ` Bart Van Assche

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=1546619558.163063.34.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=alison_chaiken@mentor.com \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --cc=geyslan@gmail.com \
    --cc=joe@perches.com \
    --cc=leo@zh-kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=r0bertz@gentoo.org \
    --cc=tiago4orion@gmail.com \
    /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.
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.