auctex-devel
[Top][All Lists]
Advanced

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

Re: Gradually replacing INITIAL-INPUT in minibuffer


From: Tassilo Horn
Subject: Re: Gradually replacing INITIAL-INPUT in minibuffer
Date: Thu, 24 Feb 2022 21:30:22 +0100
User-agent: mu4e 1.7.9; emacs 29.0.50

Arash Esbati <arash@gnu.org> writes:

Hi Arash,

> This is my idea on this: We add an additional argument `default' to
> the respective functions.  Here an example for `TeX-arg-length':

Yes, that's how the original `completing-read' does it.  Not sure if we
need to follow that conservative approach, though.  We could just rename
the INITIAL-INPUT argument to DEFAULT and change the behavior
accordingly.  Or is there any usage where initial-input is clearly
superior to a default value?  IMHO, no, and you can always convert a
default value to an initial input in terms of M-n.

Ok, initial-input allows to position point in the middle of the input
which might be handy in some situations...

> Note that the default value is considered only with a mandatory
> argument.

Makes sense.

> One question: Is there a more elegant way to construct the prompt?

Maybe

  (concat "Length"
          (when (and default (not optional))
            (concat "(" default ")")))

is a tiny bit shorter.

Bye,
Tassilo



reply via email to

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