emacs-devel
[Top][All Lists]
Advanced

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

Re: handling of completion table duplicates


From: Andreas Schwab
Subject: Re: handling of completion table duplicates
Date: Sun, 03 Apr 2016 16:34:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Ingo Lohmar <address@hidden> writes:

> I recently noticed that ivy-mode (at its very core a completing-read
> alternative, just like ido-completing-read is another one) does *not*
> eliminate duplicates from the collection it is passed, eg, in form of a
> plain list.
>
> (completing-read "Prompt: " '("a" "b" "c" "a" "d"))
>
> Both completing-read as well as ido-completing-read remove such
> duplicates,

all-completions doesn't.  The removal is probably just a side effect of
the implementation.

> Is removing duplicates from the collection *expected* from completion
> functions, or is the caller of the function responsible for providing a
> collection without duplicates?

IMHO it's the resposibility of the caller to make sure the completion
table is useful.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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