auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] TeX-insert-macro-default-style not applied?


From: Arash Esbati
Subject: Re: [AUCTeX] TeX-insert-macro-default-style not applied?
Date: Sun, 28 Oct 2018 11:26:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1

Mosè Giordano <address@hidden> writes:

> On Sat, Oct 27, 2018 at 5:03 PM Manuel Wiesinger <address@hidden> wrote:
>>
>> Hi all,
>>
>> When I set TeX-insert-macro-default-style to mandatory-args-only,
>> C-<RET> still asks me for optional arguments.
>>
>> E.g. when entering \textcolor, AUCTeX asks for the optional color model
>> argument and inserts \textcolor[some_model]{some_color}{some_text}. With
>> TeX-insert-macro-default-style set to mandatory-args-only, I would
>> expect that I'm only asked for the mandatory color and text arguments
>> and that \textcolor{some_color}{some_text} is inserted.
>>
>> Other macros show similar behavior.
>>
>> I tried this with Emacs 26.1, on two machines and with a minimal config,
>> just loading AUCTeX.
>> Is this a bug, or I missing something?
>
> `\textcolor' and similar macros use `TeX-arg-color' to insert the
> color and indeed this function doesn't respect
> `TeX-insert-macro-default-style', but this may be considered a feature
> rather than a bug because the color specification in the mandatory
> argument strongly depends on the model.  The style file was created by
> Arash, maybe he can give us a comment about this.

Hi Manuel and Mosè,

IIRC, your assumption is right here and I didn't add any code to respect
`TeX-insert-macro-default-style' since the optional argument is
important for mandatory ones.  But then again, I think Manuel is right
here and the code should respect `TeX-insert-macro-default-style'.

I'm not sure if I can give it a roll in near future, but I will add it
to my todo list.

Best, Arash



reply via email to

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