[Top][All Lists]

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

Re: completing-read doesn't require exact match when completion-ignore-c

From: Urban Engberg
Subject: Re: completing-read doesn't require exact match when completion-ignore-case is set
Date: Tue, 07 Sep 2004 09:03:23 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

> I think the problem is that the name `completion-ignore-case' seems to imply
> that it only affects completion whereas it also affects the accepted values
> of `require-match' is set.
> I think what should happen is that if `completion-ignore-case' is set and
> `require-match' is also set, completing-read should automatically fix the
> case before returning (which IIRC already happens if you hit TAB before
> RET).

Thanks, yes.  As an indication that this is the right solution, you
might look at the example, where I have a buffer named "fooA" (and no
other buffer starting with "foo").  Executing (read-buffer "Buffer: "
nil t) and entering


(or, for that sake "FoO", "fOO") will then, correctly, return "fooA",
as read-buffer will try to complete the input.



however, will return "fooa", as it seems already to have been
fully completed.

In my view, the logical implication is to say that if an exact match
has not been found, read-buffer should try completion.  Trying
completion on "fooa" will yield "fooA" as it should.

There are clearly some less trivial examples to deal with, as
e.g. what to do if there are buffers named "foOa" and "fooA".  But
again, a simple solution would be to try completion (as when you hit
TAB) as long as an exact match has not been found.  This would be
deterministic using the current implementation of completion.



reply via email to

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