Subject: bug#76028: 31; completing-read-multiple: Add prompt indicator

From: Daniel Mendler <[email-masked]>
Date: Mon, 03 Feb 2025 19:37:07 +0100

Juri Linkov <[email-masked]> writes:

>>> > I propose to add such an indicator to CRM by default. Above I have
>>> > chosen the tag "CRM" for its shortness, but a more user friendly
>>> > solution might require a longer more descriptive name. Furthermore the
>>> > code above extracts the separator from the regular expression
>>> > `crm-separator', which is not robust for all separators.
>>> 
>>> How about " [comma-separated list] "?
>>
>> Or maybe "Describe face (FACE1[,FACE2[,...]]): "
>
> I see no more descriptive prompt that providing an example,
> maybe with lower-case like all faces:
>
>   Describe face (face1,face2,...):
>
> A more generalized prompt would make this less clear, e.g.
>
>   Describe face (separator ‘,’):

Giving an example does not solve the general issue of a uniform CRM
indication for all `completing-read-multiple' calls. In the Emacs code
base `completing-read-multiple' is not used widely but it is used in
other packages, which we cannot update at once.

I find Stefan's suggestion of [comma-separated list] quite nice. See the
patch I have sent in the other mail. Maybe we could use the
[comma-separated list] indicator as fallback if a
`completing-read-multiple' call does not provide examples on its own?
Another possibility might be to use the completion category and the
separator string and convert that to an example, e.g., category face
would yield the prompt "Describe face (face1,face2,...):".

Daniel