[Top][All Lists]

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

Re: Environment optional argument defect

From: Arash Esbati
Subject: Re: Environment optional argument defect
Date: Thu, 24 Nov 2022 11:13:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

Ikumi Keita <> writes:

> It is impossible to toggle the behavior by C-u because C-c C-e
> (`LaTeX-environment'), unlike C-c C-m (`TeX-insert-macro'), eats up
> C-u for switching to `LaTeX-modify-environment'.

I agree, inserting macros and environments behave differently :-(

> (We read
> ,----
> |   ;; When called with a prefix (C-u), only ask for mandatory arguments,
> |   ;; i.e. all optional arguments are skipped.  See `TeX-parse-arguments' for
> |   ;; details.  Note that this behavior may be changed in favor of a more
> |   ;; flexible solution in the future, therefore we don't document it at the
> |   ;; moment.
> `----
> in the defun of `TeX-insert-macro'. Maybe now is the "future" mentioned
> there.)

I think this is "future past" ;-)  AUCTeX manual says this[1]

  User Option: TeX-insert-macro-default-style

      Specifies whether TeX-insert-macro will ask for all optional arguments.

      If set to the symbol show-optional-args, TeX-insert-macro asks for
      optional arguments of TeX marcos, unless the previous optional
      argument has been rejected. If set to show-all-optional-args,
      TeX-insert-macro asks for all optional
      arguments. mandatory-args-only, TeX-insert-macro asks only for
      mandatory arguments. When TeX-insert-macro is called with prefix
      argument (C-u), it’s the other way round.

So the comment above doesn't apply anymore.

> Does anyone come up with good ideas?

Would it make sense to say:

  • C-u C-c C-e modifies the document
  • C-u C-u C-c C-e toggles the arguments query


Best, Arash

P.S.: I think we also have an issue with inserting environments when
region is selected, I will try to make a recipe in another mail.


reply via email to

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