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.

Reply via email to