[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not w
From: |
Bastien Guerry |
Subject: |
bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly |
Date: |
Tue, 07 Jan 2014 13:04:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
> Seems like the behavior is wrong in this case, but I see that the same
> behavior is found for Emacs 20 through 24. So I cannot say for sure
> whether this is a bug. At least the behavior does not seem to follow
> the doc.
>
> The doc ((emacs) `Completion Commands') says that SPC does this:
>
> Complete up to one word from the minibuffer text before point
> (`minibuffer-complete-word').
>
> emacs -Q
>
> (defun cmd\ \ \ \ w\ ith\ spaces () (interactive) (message "SPACES"))
>
> (defun cmd-without-spaces () (interactive) (message "NOPE"))
>
> M-x cm SPC ; correctly completes to `cmd'
> SPC ; completes to `cmd '
>
> Since SPC is supposed to complete a word at a time, and since both ` '
> and `-' are word separators, I would expect that there are two
> word completions for the prefix `cmd': `cmd ' and `cmd-'.
>
> So I would expect to see *Completions* displayed, showing the two
> candidates `cmd w ith spaces' and `cmd-without-spaces'.
See the first comment in `completion--try-word-completion':
the function considers that either a space *or* an hyphen will
be used to separate words. The "or" is exclusive.
> Admittedly, this is a corner use case.
Yes -- note that TAB works fine here instead of SPC.
The only place I can think of where this could be a problem
is the info manual (`g' or `i' to go to a node or to find an
index entry.) Still, you're not like to stumble on such case.
I'm for closing this bug until it really hit someone.
- bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly,
Bastien Guerry <=