help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indentation


From: Wayne Harris
Subject: Re: indentation
Date: Tue, 04 May 2021 18:03:10 -0300

Tassilo Horn <tsdh@gnu.org> writes:

> Wayne Harris via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
> Hey Wayne,
>
>>> FWIW, I'd write your example as
>>>
>>> \noindent {\em Notation.} As we often write polynomials in finite rings of
>>> characterisc 2, let's define
>>> \[
>>>   \poly(x) = ...
>>> \]
>>> in the same way that it was used in the introduction.
>>>
>>> which is indented according to how AUCTeX would do it or the builtin
>>> `latex-mode' if `latex-indent-within-escaped-parens' is t.
>>
>> Thank you.  I had no idea what was going on there.  Clearly the root
>> cause of the problem is not understanding what is going on.  That's
>> life:
>
> Absolutely!
>
>> I took a while to begin using paredit-mode precisely for not being
>> able to minimially live with it, but it's been really worth it to try.
>> (I use it constantly now.)  Maybe the same will happen with
>> electric-indent-mode.
>
> Possibly.  If you want to, you might also want to try the
> `aggressive-indent' package (from MELPA; its minor-mode is
> `aggressive-indent-mode') which is essentially `electric-indent-mode' on
> steroids, i.e., it indents the current function according to the mode's
> rules on every edit which makes it completely impossible to fight
> against the mode's indentation rules.  (Of course, aggressive-indent is
> mostly suited with programming modes; it works very well with lisp.)

Lol!  I like that a lot, actually.  It would show me what are the rules.
I didn't it in the previous message, but I almost wrote that I was going
against it because I didn't know what the rules were in the first
place.  If software will do a reasonable job and all by itself, I'm
definitely willing to accept the reasonable result.

So, I'll report back if my experience is interesting wih the
aggressive-indent package.  Thanks for pointing it out.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]