Re: [PATCH] Documentation/CodingStyle: Move emacs settings into .dir-locals.el

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

 



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

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

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

+AD4 In addition, probably, there are people who do not want to use local
+AD4 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+AF8-node/emacs/Directory-Variables.html.

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

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

Bart.



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux