[Top][All Lists]

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

Re: completing-read a list of keywords

From: Roland Winkler
Subject: Re: completing-read a list of keywords
Date: Sun, 19 Apr 2020 00:07:04 +0200

On Wed Apr 15 2020 Stefan Monnier wrote:
> > Stefan, I believe you suggested this to me when you helped me a few
> > years ago to extend crm to handle regexps as crm-separator.
> Ah, so your patch fixed the problem I was thinking of?  If so, we
> should likely change the SPC binding there: I think it's more
> often harmful than useful in this context.

Hi Stefan,

Yes and no!  ...I had to referesh my memories about this:

Originally, completing-read-multiple only supported a
single-character string for crm-separator which defaulted to ",".
I guess back then SPC was rarely used as self-inserting character
with completing-read-multiple and it was OK that
crm-local-completion-map bound SPC to crm-complete-word.

For BBDB, I didn't like that crm-separator was restricted to a
single character, and you helped me so that now crm-separator can be
any regexp with new default  "[ \t]*,[ \t]*".

But like the OP, I was rather annoyed that crm-local-completion-map
binds SPC to crm-complete-word.  You suggested to me that BBDB could
define its own keymap for completing-read-multiple that makes SPC
self-inserting.  To the best of my knowledge, this has worked well
for BBDB.  I am not aware of complaints from BBDB users that missed
a keybinding for crm-complete-word.

But today I do not understand anymore: how was the new default for
crm-separator ever supposed to work elsewhere?  I tried to define
some simple test cases and quickly I got very annoyed by
crm-complete-word that interferes with an intuitive usage of

So I suggest: we change crm-local-completion-map such that it makes
SPC self-inserting.  This may represent a minor inconsistency
compared with other completion commands.  But in my opinion, this
inconsistency is justified by the very purpose of
completing-read-multiple.  (Personally, I wouldn't mind if there was
simply no default keybinding for crm-complete-word, as it is now the
case inside BBDB.  Otherwise, maybe we can come up with a "more
exotic" keybinding for it.)

Or am I missing something else?

reply via email to

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