GNU bug report logs - #17375
24.4.50; minibuffer completion by SPC

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Wed, 30 Apr 2014 07:51:01 UTC

Severity: normal

Found in version 24.4.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 17375 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#17375: 24.4.50; minibuffer completion by SPC
Date: Wed, 30 Apr 2014 21:53:30 -0400
> (get-buffer-create "foo-bar")
> That's all!
> Could you try this on `emacs -Q'?  And you will see that the first
> SPC for `C-x b' doesn't insert a space (I'm not quite sure if it
> happens on every platform, though).
> Maybe a buffer-name containing a hyphen triggers this problem.

Indeed, that's it.
It's due to the fix for http://debbugs.gnu.org/15980.

I.e. if we have buffer names " toto" and "foo-bar", then both " " and
"-" have valid completions (remember: C-x b uses substring completion),
so bug#15980 says that instead of choosing arbitrarily between " " and
"-", we should just leave the input unchanged.

I must say I dislike "word completion".  Both because its behavior is
largely ill-defined (e.g. what does it mean to "complete at most
a single word" when the completion table completes "a-b-$FOO-a" to
"a-b-c-a-d-a"?), and because I'd rather leave SPC as a self-insert key.

So in this case, I'd tend to prefer reverting the fix for bug#15980, so
that " " is preferred over "-" on the premise that it makes SPC behave
a bit more like self-insert-command.


        Stefan




This bug report was last modified 11 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.