bug-auctex
[Top][All Lists]
Advanced

[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: Gustavo Barros
Subject: bug#47757: 13.0.6; Point position after indent-for-tab-command with LaTeX-syntactic-comments
Date: Wed, 14 Apr 2021 08:43:50 -0300
User-agent: mu4e 1.4.15; emacs 27.2

Hi Tassilo,

On Wed, 14 Apr 2021 at 05:28, Tassilo Horn <tsdh@gnu.org> wrote:

I was able to reproduce the behavior by your very good recipe.
Basically, I like the behavior to move point to the actual comment text but the combination with `electric-indent-mode' is indeed very annyoing. I've changed it on our git master so that it'll jump after the % only if
the currently executing interactive command is an indentation command
(and not, e.g., `TeX-newline').

Here's the changed definition. Please eval it and see if you spot some
raw edges.

Thank you very much for looking into this.

I've tested (lightly) the new definition, it does indeed fixes the interaction with `electric-indent-mode' and, as far as I can tell, introduces no other problems, and leaves no "raw edges" I could spot.

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? My git-blame-fu, which is not very good, says it is pretty old. But I really don't recall ever noticing it, perhaps it is just the age of that little piece between the keyboard and the chair...

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"?

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.

Thanks again for the quick response and fix!

Best regards,
Gustavo.





reply via email to

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