all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Xairi <xairi.valdivia@gmail.com>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: [elpa] master 6c3842e 2/6: Add scala-mode to excluded-modes (#88)
Date: Wed, 12 Oct 2016 18:05:43 -0300	[thread overview]
Message-ID: <CAAdUY-JGhasprwWgcgeTpL4tBEgGMimJ22uHYcuSJsA_1y6+7g@mail.gmail.com> (raw)
In-Reply-To: <jwva8e9uzby.fsf-monnier+emacsdiffs@gnu.org>

On 12 October 2016 at 16:48, Stefan Monnier <monnier@iro.umontreal.ca> 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.



  reply	other threads:[~2016-10-12 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161012191324.23934.59986@vcs.savannah.gnu.org>
     [not found] ` <20161012191324.8A15C220170@vcs.savannah.gnu.org>
2016-10-12 19:48   ` [elpa] master 6c3842e 2/6: Add scala-mode to excluded-modes (#88) Stefan Monnier
2016-10-12 21:05     ` Artur Malabarba [this message]
2016-10-12 22:07       ` Stefan Monnier
2016-10-13  1:02         ` Artur Malabarba
2016-10-13  3:25           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAdUY-JGhasprwWgcgeTpL4tBEgGMimJ22uHYcuSJsA_1y6+7g@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=xairi.valdivia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.