Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp142574pxf; Thu, 25 Mar 2021 00:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLyszcCneN6vWiiYpEe35Zz44o/YIQmTyI48n+mNI3l5tTYNGyqk1zDjxE+5Ft/4Gj+8TI X-Received: by 2002:a17:907:7355:: with SMTP id dq21mr7558815ejc.159.1616655800933; Thu, 25 Mar 2021 00:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616655800; cv=none; d=google.com; s=arc-20160816; b=VDSm4V1uN7VYQKm1pM7R7X1SL3WxKKLWFbh7j/ouWFEVhw8t9DkvLRWtyLM9bpYeBi qmZ85XHPmARMb9/A0GLYIiH67oCoLWYwcuaGkcNt1r/hl5KqStGUze7HdRHVjeqZ6AqZ 8rQeOfaGRcKOR/1S5Ty09v0VSpNg6rUGcfI4jq8mUfzqdbeS4b2mAqcDcxTs9193GPVA khKlDWE69k6zKN8Pp1Uh5qIc+zgb1dz2QI4vssQFwXPnlLN7EwPK88JAlXB2tvLklKIM ZLZcMycKe+tPWSg+bf+ygxzIYwQb1Q1m3P4uv062xMDXuVQqrHlThqHoq7XBxyKdTgK+ o9AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=35qK+TDUWH89XFuOlT4Ceqr1ByyKjN1HXv9JJtPoq+g=; b=Cbgo/PCUxHXiTEWUpkHRubNVsyAg1rXd/kAPVqiD6iIGl4G+a9JIHOydKcI2DbEw0N ivexPVuw/VjZF1xI+fj6qdOsvmFj8Th465z3jICIFY2Wi8coAGjEhzLRhAyI9J38grNR EidvEZYPJgRGLCCRBG2I9bamxXC8R1Blgk37QGPxoLOr5dS9qTmpVVkRoFaEeVL1a8N8 Z4JmrBJiGBl/FvQuGfmo+hpe4ghN2y8nOc+RPEF/SznXVHnJm2RAm2pXkr+ujaGvF8rf vInHTngN+XgqqTW7NO1TSSnoQrxD5s5paoyIasT1t+KdnOKVJjobTEEZ949rFLCMi/rC 36YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="oV0ah/M8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si3560670edw.236.2021.03.25.00.02.58; Thu, 25 Mar 2021 00:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="oV0ah/M8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbhCYHCD (ORCPT + 99 others); Thu, 25 Mar 2021 03:02:03 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:27216 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhCYHBa (ORCPT ); Thu, 25 Mar 2021 03:01:30 -0400 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 12P71Eji000576; Thu, 25 Mar 2021 16:01:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 12P71Eji000576 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1616655675; bh=35qK+TDUWH89XFuOlT4Ceqr1ByyKjN1HXv9JJtPoq+g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oV0ah/M8nbV4SL9InNpQBg3Kj8vCLpbHUESpOD5H3E9hNDIHqTlfhOlJFuzQw6ZwE 06p8an8PfpN6K5Y1GVTiEK95Zt9EdO3D1kQNDzrrW9UClGaugyGMbieWQEyNKffr5n iFFz8PBtq0MMFruArb+Z1PX7zhmy411gG/D0Mvb2YSaAJpZdFHnVU1ZPDyPbyWNBF7 N7R9NQqGERe5wP9SQmf0p//hkopXNtnzoqHYQDYUyB0LY/4ng9RWmGVHp+HCl2neME ttdvdnBaOcGxY/KU57Zxcoion88GVwp4xctsVQW+Z0QT4na165Wqll5NAuG0xMoA32 4H1U+/G6pJb7w== X-Nifty-SrcIP: [209.85.210.172] Received: by mail-pf1-f172.google.com with SMTP id y200so1067160pfb.5; Thu, 25 Mar 2021 00:01:15 -0700 (PDT) X-Gm-Message-State: AOAM533E0MultMW8Axb7uUd79JuqnvwXIObq8kHQJ5FTZLFp/DZCvEWL 2JE+m/E378g1coAOQ/IKZvCJcguxk+oF9pVTNv8= X-Received: by 2002:a65:41c6:: with SMTP id b6mr6182669pgq.7.1616655674402; Thu, 25 Mar 2021 00:01:14 -0700 (PDT) MIME-Version: 1.0 References: <16043769.gqpzGLO8mG@pinwheel> <20200703073143.423557-1-danny@kdrag0n.dev> <20200703062950.5e8c1785@lwn.net> <9486d1ab-580a-0819-10c9-a62354a255e1@rasmusvillemoes.dk> In-Reply-To: <9486d1ab-580a-0819-10c9-a62354a255e1@rasmusvillemoes.dk> From: Masahiro Yamada Date: Thu, 25 Mar 2021 16:00:37 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] editorconfig: Add automatic editor configuration file To: Rasmus Villemoes Cc: Jonathan Corbet , Danny Lin , Andrew Morton , Andy Whitcroft , Joe Perches , "open list:DOCUMENTATION" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 24, 2021 at 8:01 PM Rasmus Villemoes wrote: > > On 03/07/2020 14.29, Jonathan Corbet wrote: > > [doing a bit of necromancy here] > > > On Fri, 3 Jul 2020 00:31:43 -0700 > > Danny Lin wrote: > > > >> EditorConfig is a standard for defining basic editor configuration in > >> projects. There is support available for 47 code editors as of writing, > >> including both built-in and extension support. Many notable projects > >> have adopted the standard already, including zsh, htop, and qemu. > >> > >> While this isn't a full-fledged C code style specifier, it does set some > >> basic ground rules that make it more convenient for contributors to use > >> any editor of their choice and not have to worry about indentation, line > >> endings, encoding, final newlines, etc. This should make it > >> significantly easier to conform to the kernel's general code style when > >> used in combination with clang-format. > >> > >> For more information, check the official EditorConfig website: > >> https://editorconfig.org/ > >> > >> Signed-off-by: Danny Lin > >> --- > > > > So I worry a bit that not everybody will welcome the addition of a dotfile > > that may be magically interpreted by their editor. > > I would suppose that one would have to enable editorconfig support > explicitly in one's editor, so this would have no effect for people that > haven't done so (though there are almost certainly exceptions). > > > I also worry that the > > file itself could become a battleground for people wanting to argue about > > style issues. > > I don't think so, not any more than the coding-style document is, and > that seems to be pretty solid (but as doc maintainer, you'd know better). > > > > > Perhaps I worry a bit too much...? > > As someone who regularly needs to submit patches to random upstream > projects to fix bugs or implement minor features, I for one would really > welcome more widespread use of editorconfig. While I mostly work with > the linux kernel (and other projects using the same C style), so my > default C style setting is "linux", even for the kernel this would be > helpful to me when I poke around in none-C files (shell scripts, for > example). > > Rasmus Just from my curiosity, I just checked the behavior when the language is specified by a shebang line. For example, scripts/diffconfig has no file suffix, but specifies '#!/usr/bin/env python3' at the very top line. This is sensible for tools that interface to users. Users have no interest in which language is used internally. As far as I test this patch on Emacs, it follows the rule of [*] rather than [*.{pl,pm,py,tc,json,tc}]. This is the correct behavior but not what we want in general. I do not mean I am negative to this patch. Rather, I very much like this patch, but I just wondered how this case could be handled. I found this: https://github.com/editorconfig/editorconfig/issues/404 I did not read through it, though. -- Best Regards Masahiro Yamada