Mosè Giordano <[email protected]> writes:

>>> After some testing I'm not persuaded it's a good idea to remove
>>> `TeX-math-close-double-dollar'.  E.g., a plain TeX user probably want
>>> to set `TeX-electric-inline-math' to '("$" . "$"), but if point is
>>> after the third dollar in the following line
>>>   $$ a+b=c $
>>> pressing another time `$' will insert a couple of dollars because
>>> there (texmathp) returns nil.  This isn't the expected behavior and
>>> `TeX-math-close-double-dollar' does a better job.
>>
>> If he uses `TeX-electric-inline-math', how could he reach that
>> 3-dollars state except with `C-q $'?
> No need of `C-q $' at all.  This is the `C-h l' log of the keystrokes
> needed to write that:
>     $ <right> SPC a + b = c SPC $
> `(texmathp)' returns t before the third dollar and a single dollar is
> inserted when `TeX-math-close-double-dollar' is nil, a couple of
> dollars otherwise.

Well, after typing the initial dollar above, the inserted text with |
being (point) is $|$.  Why should a user prefer to type <right> or C-f
to jump over the second $ instead of quickly typing $$ resulting in
$$|$$?

I mean, the alternatives are

  1. $ <right> formula $
  2. $$ formula

and the first takes 3 special key presses of 2 different keys whereas
the second only takes 2 $-key presses.  So IMHO, the first approach
seems even worse than typing $$ formula $$ without electricity.

Ok, one benefit of alternative 1 is that point is after the math
afterwards whereas it is $$|$$ in alternative 2.  But then, such
formulas are usually written on their own line, so that doesn't make a
difference.

> Can I keep `TeX-math-close-double-dollar'?

I don't have strong opinions, I just don't like having several quite
similar features that might confuse more than help.  But if you feel
that it's important, then we'll just keep it.

Bye,
Tassilo

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to