[Top][All Lists]

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

bug#47757: 13.0.6; Point position after indent-for-tab-command with LaTe

From: Tassilo Horn
Subject: bug#47757: 13.0.6; Point position after indent-for-tab-command with LaTeX-syntactic-comments
Date: Sat, 17 Apr 2021 10:01:31 +0200
User-agent: mu4e 1.5.11; emacs 28.0.50

Gustavo Barros <gusbrs.2016@gmail.com> writes:

Hi Gustavo,

> So it was intended behavior after all!  But, still, now that I became
> aware of it, I'm a little baffled by it.  I'm on the verge of asking
> you to make this configurable, but I'm still not sure about it.  Is
> this behavior indeed new?

No, not really.  AUCTeX does it at least since 2004 where
`LaTeX-syntactic-comments' was named
`LaTeX-format-comment-syntax-aware'.  And `electric-indent-mode' is on
by default since 2013, too (I don't know what was the first emacs
version with that change).  So indeed, it also baffles me that nobody
spotted the annoying newline behavior until now.

> To be a little more precise, I do like it to be able to move to the
> beginning of the comment content, just as you do.  As a matter of
> fact, I use a local variant of package `mwim' for the purpose.  But
> I'm not sure this is something I'd expect (or like)
> `indent-for-tab-command' (& friends) to do.  Also, I don't really get
> why this behavior should depend on `LaTeX-syntactic-comments'.  True,
> its docstring says it "influences the behavior indentation and
> filling", but I'd assume this means the end result of the indentation
> and filling in the buffer, not quite a difference in point behavior.
> Regarding the later, why being "handled according to LaTeX syntax"
> means point is left at the beginning of the comment content instead of
> at the end of whitespace?  In other words, isn't "performing inner or
> outer indentation" (to use the terminology in
> `LaTeX-current-indentation') something different from "where to place
> point after indenting"?

Well, maybe, maybe not.  I see as `LaTeX-syntactic-comments' as
"consider the contents of comments to be LaTeX entities, too", and then
it makes sense for TAB to end up at the actual content of the comment
and not the comment starter.

> Anyway, if this is old behavior and users are already familiar with
> it, it is certainly the case that I'll eventually get used to it too,
> and tampering with it is inadvisable.  And, even if it is new(ish),
> feel free to let the last couple of paragraphs just slide away.
> Unless you happen to think there is something interesting in those
> observations, in which case I'm happy to discuss further.

I can follow your reasoning but given that you are not really opposed to
the current behavior and neither are other users, let's just keep it


reply via email to

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