aggressive-indent-mode icon indicating copy to clipboard operation
aggressive-indent-mode copied to clipboard

Comparison to auto-indent-mode

Open raxod502 opened this issue 6 years ago • 5 comments

I am deciding between Aggressive Indent and Auto Indent. Are you familiar with the latter? Would you consider adding some documentation on the similarities and/or differences between these two packages, given that both appear to have the same goal?

raxod502 avatar Sep 18 '17 00:09 raxod502

Hi there. No, I'm not familiar with it. Still, FWIU, auto-indent only acts on yank/paste, while aggressive-indent acts on any change you make to the buffer.

Malabarba avatar Oct 12 '17 01:10 Malabarba

I agree with @Malabarba. Those are totally different. auto-indent is just for yank/paste operations.

seagle0128 avatar Oct 18 '17 15:10 seagle0128

This wasn't immediately clear to me, so that was why I suggested documenting the difference. For example, what's the practical impact? One of the problems with Aggressive Indent is that it lags Emacs when the major mode provides slow indent code, so one might be tempted to try Electric Indent + Auto Indent instead. But then the question is, in what circumstances would you end up with incorrectly indented code if you were using Auto Indent instead of Aggressive Indent? I don't know, since neither project provides a succinct comparison.

I might be able to contribute such documentation myself if/when I get around to refactoring my configuration's indentation code.

raxod502 avatar Oct 18 '17 19:10 raxod502

I'm always open to PRs adding documentation. It's unlikely that I'll be able to write a comparisons like that myself.

Malabarba avatar Oct 21 '17 15:10 Malabarba

FWIW, I've ended up writing something similar too: https://github.com/xendk/indentinator

I haven't gotten round to trying to getting it in MELPA, as it really doesn't do anything new, doesn't try to be as smart as aggressive-indent but it works nicely for me (limitations considered).

xendk avatar Aug 25 '19 21:08 xendk