From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 6c3842e 2/6: Add scala-mode to excluded-modes (#88) Date: Wed, 12 Oct 2016 18:05:43 -0300 Message-ID: References: <20161012191324.23934.59986@vcs.savannah.gnu.org> <20161012191324.8A15C220170@vcs.savannah.gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1476306429 27374 195.159.176.226 (12 Oct 2016 21:07:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 21:07:09 +0000 (UTC) Cc: Xairi , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 12 23:07:03 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buQju-0006Hy-Su for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2016 23:07:03 +0200 Original-Received: from localhost ([::1]:35935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buQjs-0004j7-Ts for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2016 17:07:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buQj1-0004ha-Bq for emacs-devel@gnu.org; Wed, 12 Oct 2016 17:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buQiy-0006D9-WF for emacs-devel@gnu.org; Wed, 12 Oct 2016 17:06:06 -0400 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:33963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buQiy-0006D3-RT for emacs-devel@gnu.org; Wed, 12 Oct 2016 17:06:04 -0400 Original-Received: by mail-oi0-x22b.google.com with SMTP id t73so75648077oie.1 for ; Wed, 12 Oct 2016 14:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kOiUwyHg/B+cFiZSd016Hxvq65kNFTlLs2f2YDhTVQo=; b=DQpow7FWiePoIfWTGazfQfQPwrkQ9k1nDbechVCbRioNoOXaoAXdEwZwaqWJ/hqDll QF11vubQQtIsec6qKBRxysOa8ZmxbSwUuhP6u1bGYgsazQTg9BO7Xmbp/gBsGhRoU5LB Du/zXQ4N1CtQxzRbdfFkDdjHc00CTejSTwfQzZcZNsvpDIf/xtQKm4zvV7uBL/gTjZaJ lejy9SS6MqBJep/SLTmel+nD2Sm4XBJ0JNmHyhtbbkGGRPYkg1TPVwLzo1AUqJQ7u/XN qidlwD9ZIiXfTHbNYH/rbChC/JZTDOjkW+Rab97zGfiL/BCen7oWvtOMHA0YyD5gDZxF yI5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:sender:in-reply-to :references:from:date:message-id:subject:to:cc; bh=kOiUwyHg/B+cFiZSd016Hxvq65kNFTlLs2f2YDhTVQo=; b=ULkhx9Yy9iLFUwsWpvHggvkcw9uh8nQCgS+QZKeg1sGvxBSaYzUr7h8IYBGLD7Pz+/ 05JNdOwa80+BU4Y2N4vpKaicEOUn9I97mUkjC7RCjKEd6G0hBq0y9vkjFbIPXou1/bZ9 miPl7fOYKteXYzkgrKOwj4Ln4+WfljQ0ZQ3KnBsCJitWBa7IV0bKgO8saZNAI7YTkZQw lCUH3u3+xyGU04ou6+0ONcfY7jWW/SFoDfK99a8qa0ae60a32wtBClyeu/z+YwOIXd83 qmW+XXBtWfbHYUuTxydBYRy2jE140KQgtajtzIC/B8S4ZWu6xzYJVVi4hnvLDw7jdV/I Scmw== X-Gm-Message-State: AA6/9RlbpCxLqxg1p/CVoq20PRa/0620DospyDJjUH/JB3eTaMLnedSHIWtUojaDP+r8kva1hC5WrrnQnoGJlQ== X-Received: by 10.202.57.215 with SMTP id g206mr1935365oia.97.1476306364155; Wed, 12 Oct 2016 14:06:04 -0700 (PDT) Original-Received: by 10.182.155.74 with HTTP; Wed, 12 Oct 2016 14:05:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: x25oUAIjJiGWiHNWdTzS6ZebUkg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208188 Archived-At: On 12 October 2016 at 16:48, Stefan Monnier wrote: >> --- a/aggressive-indent.el >> +++ b/aggressive-indent.el >> @@ -136,6 +136,7 @@ Please include this in your report!" >> netcmd-mode >> python-mode >> sass-mode >> + scala-mode >> slim-mode >> special-mode >> shell-mode > > Isn't aggressive-indent-excluded-modes a bit blunt/arbitrary? Indeed. :-( > I mean, shouldn't we argue for each mode *why* it shouldn't use > aggressive-indent, and then maybe come up with a way to make this > variable unnecessary (because we can determine it automatically)? Scala-mode was added because it takes the liberty of doing some whitespace cleanup during indent-region, so it was preventing users from typing properly. See: https://github.com/Malabarba/aggressive-indent-mode/issues/87 I didn't have time to look for a config option to disable that, (and even then, I don't think I want aggressive-indent to go around changing semi-unrelated) so I disabled it in scala-mode. > E.g. maybe some of those modes shouldn't use aggressive-indent simply > because auto-reindentation can't be done reliably (in which case, > aggressive-indent could check something like electric-indent-inhibit > which was introduced for the same kind of needs)... Yes. A lot of these are there for this reason, and we could use `electric-indent-inhibit` for that (I didn't know about it). Other modes are there because indentation makes no sense for them at all. Such as shell-mode, which I see doesn't set electric-indent-inhibit. We can't avoid these modes simply by restricting ourselves to modes derived from prog-mode, because some modes (like html or xml) do make sense to indent but are not derived from prog-mode. Now that I have the advantage of hindsight, I see it would have been easier to restrict to prog-mode and implement a white-list, instead of taking everything and implementing a black-list.