From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#35224: [PATCH] include indentation size in .dir-locals Date: Thu, 11 Apr 2019 16:22:54 +0100 Message-ID: <87zhow36sx.fsf@tcd.ie> References: <20190411011046.28243-1-Hi-Angel@yandex.ru> <1554963878.18502.0@yandex.ru> <1554979143.18502.4@yandex.ru> <1554991004.18502.5@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194599"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35224@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 17:24:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEbYn-000oWt-3k for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 17:24:17 +0200 Original-Received: from localhost ([127.0.0.1]:50653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbYm-0004i8-12 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 11:24:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbYZ-0004d8-Tk for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 11:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEbYY-00051f-Jg for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 11:24:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41494) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEbYY-000516-4V for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 11:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hEbYX-0005Rj-RE for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 11:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2019 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35224-submit@debbugs.gnu.org id=B35224.155499618720876 (code B ref 35224); Thu, 11 Apr 2019 15:24:01 +0000 Original-Received: (at 35224) by debbugs.gnu.org; 11 Apr 2019 15:23:07 +0000 Original-Received: from localhost ([127.0.0.1]:55038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEbXf-0005Qe-A2 for submit@debbugs.gnu.org; Thu, 11 Apr 2019 11:23:07 -0400 Original-Received: from mail-ed1-f68.google.com ([209.85.208.68]:37692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEbXd-0005Pw-7S for 35224@debbugs.gnu.org; Thu, 11 Apr 2019 11:23:06 -0400 Original-Received: by mail-ed1-f68.google.com with SMTP id f53so4001195ede.4 for <35224@debbugs.gnu.org>; Thu, 11 Apr 2019 08:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=rT/WkUFVkfEXn/rKRuMdJZy4wMUnJgn5OdXkQT2oNkA=; b=oSLian8LFX2XLFuzaIfxqEMSP+/cumPsb54grGfldH8CqNRc5cq7S9JZ3doxMtZy3d jc8fpdhO38YM5hLsY5wASEfdwpng2WoEAsAKp6Q9Q6gjqGzMPIR9VLaTLA5bSbJAodI0 dTiqUrVGV02QZdduassZ5qEWKbWLoFGKqmpci75IlQpHhGQGwILpdmCFg1qkek3/PLet mhw/am7WuH+RSfW6JNVQ9f3HyLUilqmyPD1CvYh7hbfYFe2a3uFmhFVVld1I2e3Vcote 1vATWk5zw/XGLCjxxhE6bGrmbjkvHIqWxezx7qBe3C9rXRjMxYwI6GHLay0Gkaub1ge6 rE8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=rT/WkUFVkfEXn/rKRuMdJZy4wMUnJgn5OdXkQT2oNkA=; b=dstO047oeRLIi7VERi1znxXkhhntVobxJIQ7nLBVEz+1qNYfBql27XUFHaSUqABGXv /czsvXXhrB5piVwLRbJzbb7UyxNbBJb7I0raYPEj2BrQlxhV7M9uVrDKvfp9/h2Iw6FN DmWtrnJp1Ia1NMv1uLTMkR9C3iXCBv0f89s7yfeuUPoBe9nTuLfHN466xNsHYs6dsdkk 6gBaVTNU1CbzeNY6XZLk+ZrYK1vyxcNbgiRWC/C0kGf1Smp44B9zmuwlUZHB5PKDstGk CQ+CiCuLgmJwdXyTfMcQgYfsRty99IJCtbnfRT559pLckW/gBPHk10oVJAgPzRHibTGi FMmg== X-Gm-Message-State: APjAAAVVcK+6KlsogufzvH84TZsQONaRLlSrAHaOGhPj6TGFsp4xo4qu CE5s0WvVljZfHs4aU07sz0e+SaWR+c6ArXLA X-Google-Smtp-Source: APXvYqzYF8L9RCLu9S5ZVsJ/VpUPhXiq5uqBcrca1Cg9R4FfqbjQWyHiEdX/RmLgVsQtUTlNXUUnwQ== X-Received: by 2002:a17:906:81cf:: with SMTP id e15mr26822352ejx.241.1554996177400; Thu, 11 Apr 2019 08:22:57 -0700 (PDT) Original-Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id r18sm4273402edq.38.2019.04.11.08.22.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Apr 2019 08:22:56 -0700 (PDT) In-Reply-To: <1554991004.18502.5@yandex.ru> (Konstantin Kharlamov's message of "Thu, 11 Apr 2019 16:56:44 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157504 Archived-At: Konstantin Kharlamov writes: > On =D0=A7=D1=82, Apr 11, 2019 at 11:58, Basil L. Contovounesios wrote: >> Konstantin Kharlamov writes: >> >>> On =D0=A7=D1=82, Apr 11, 2019 at 11:26, Basil L. Contovounesios >>> wrote: >>> >>>> Globally setting c-basic-offset overrides the cc-mode style inheritan= ce >>>> system. There are various ways to customise this variable in a more >>>> granular way, such as defining a custom style which inherits from a >>>> built-in style, or setting c-basic-offset locally in a mode hook. >>>> For details, see (info "(ccmode) Config Basics"). >>> >>> Oh, okay, so this works as expected. But since googling "change indent= ation >>> size" always gives using specifically c-basic-offset (e.g. >>> https://stackoverflow.com/questions/14939608/how-to-change-emacs-struc= t-indents-from-4-to-2-spaces), >>> I guess it's safe to assume most of Emacs users has it changed. So it's >>> useful >>> to add this to dir-locals anyway. >> >> IMO, that's a bug in the configuration of those users because they're >> overriding how cc-mode works, and the cc-mode manual describes in detail >> the various ways to customise indentation. So I don't see a need to >> change the Emacs dir-locals-file to accommodate this use-case. > > Okay, but we can't ignore the fact that such usecase exists and is widely > employed (if needed, I can throw more links to these advices on stackexch= ange > site). The widespread dissemination of synoptic, not universally applicable, or bad advise in the wild doesn't necessarily validate any particular use-case. > So let me ask: is there a downside to making this change? Because if ther= e's > none then the change is an improvement, it's that simple. The downside is that this is an invasive change in that it affects all people working on the Emacs sources. For many it may have no obvious effect, for others it may mask problems/inconsistencies in their configuration, and yet others it may end up annoying due to unforeseen consequences. A net loss, potentially. There is nothing obviously wrong with the current Emacs dir-locals-file in this respect (if it ain't broke don't fix it), whereas the user customisations you refer to are arguably problematic (if it is broke fix it). Again, just one opinion; I won't mind if others welcome this change. --=20 Basil