[Top][All Lists]

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

Re: Doc of deprecated INITIAL-INPUT arg of completing-read

From: Jean Louis
Subject: Re: Doc of deprecated INITIAL-INPUT arg of completing-read
Date: Fri, 1 Jul 2022 08:54:53 +0300
User-agent: Mutt/+ () (2022-05-21)

* Richard Stallman <rms@gnu.org> [2022-06-30 06:08]:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>   > I have many use cases for initial-input, when making calls I need to
>   > make a note, and I like entering new date and time automatically as
>   > initial input, so that I do not need to invoke keys in minibuffer.
> Is there a reason not to handle this the way most commands do?  That
> is to use the current or last-used date-time as the default, if the
> argument is empty.

There are good reasons. I am using read-from-minibuffer and
completing-read many times per day as that is one of the way how I
enter new notes about assigned tasks.

In general INITIAL-INPUT is helpful to easier enter some value, and
DEFAULT is what is chosen if no value is entered.

Those are two different meanings not related to each other. 

If some people choose to make them same, it does not make their
underlying functionality same. That is matter of docstring to explain
it well for users.

The DEFAULT I use for those cases where there is nothing written in
the prompt in minibuffer, so just by pressing RET I would get the

DEFAULT may be inserted also with M-n however, when there are many
entries in completing that is rather for me "unsafe" way to choose the
default as I may not have assurance that I have pressed M-n once or
more times, and more often I use M-p to go back in history to choose
some previous value.

INITIAL-INPUT I use to help myself to enter some information quickly
in the minibuffer. It is often, in my case more than often, different
then the default.

Practical examples:

Task has been assigned, and report is written on the task. DEFAULT is
"2022-07-01 Customer informed." but INITIAL-INPUT may be exact date
and time with space waiting for me as user to enter the actual note
about it, like this: "2022-07-01 14:22 ". If I however, delete it, and
press RET, I would get default "2022-07-01 Customer informed."

Further, I do not use those functions directly, they are wrapped in my
functions and what is DEFAULT is usually database backed entry, while
what is INITIAL-INPUT is usually dynamically generated string to help
me as user spare writing.

This may not mean much to people who rarely use completing-read or
read-from-minibuffer -- it means to me and team members who use it way
too often and where INITIAL-INPUT becomes helpful string placed in
mini buffer to help the with editing. It does not represent the

Also note that in database backed editing there may be different
users, and one user could turn off INITIAL-INPUT, while other could
have it, while third one could customize it. 

In general INITIAL-INPUT shall not be considered neither similar nor
equivalent to any DEFAULT, it should be considered as helpful way to
put initial string in minibuffer, whatever it may be such, and initial
input is on my side rather editable, while DEFAULT is not necessarily
considered editable.


Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

reply via email to

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