Subject: Re: bug#11906: 24.1; completion-at-point failures

From: Stefan Monnier <[email-masked]>
Date: Sat, 07 Dec 2013 17:45:26 -0500

> --8<---------------cut here---------------start------------->8---
> Assume three candidates (ObjC selectors) for completion and
> completion-cycle-threshold is 5:

>   1. stringWithContentsOfFile:
>   2. stringWithContentsOfFile:encoding:error:
>   3. stringWithContentsOfFile:usedEncoding:error:

> After cycling a few times, I see:
> [NSString
> stringWithContentsOfFile:stringWithContentsOfFile:encoding:error:stringWithContentsOfFile:usedEncodin$
> --8<---------------cut here---------------end--------------->8---

Ah, you're talking cycling, not just completion.  Yes, cycling needs
special treatment since a full candidate is inserted, after which it may
very well be that point is not inside the completion field any more.

This said, minibuffer.el already has some special treatment for it, but
I guess it doesn't cut it in your case.  Can you show a concrete test
case (ideally starting from "emacs -Q")?

        Stefan