Subject: Re: bug#6830: widget-complete bad completions in :type 'file

From: Chong Yidong <[email-masked]>
Date: Sun, 04 Mar 2012 17:37:57 +0800

Eli Zaretskii <[email-masked]> writes:

>> Does the problem go away if in
>> 
>>     (let ((minibuffer-completion-table collection)
>>           (minibuffer-completion-predicate predicate)
>>           (ol (make-overlay start end nil nil t)))
>>       (overlay-put ol 'field 'completion)
>> 
>> you also specify a `priority' of (say) 5?
>
> I didn't try, but I don't see how this would help.  The above overlay
> _is_ the cause of the problem
> ...
> Having the priority of the above overlay higher will just cause the
> completion fail on GNU/Linux as well, AFAIU.

Sorry, I'm afraid I still don't understand.

As far as the completion code is concerned, the correct field to use is
the `completion' field assigned by completion-in-region.  In this case,
it's a mistake to pay attention to the underlying widget field.  So why
doesn't it work to give the `completion' overlay a higher priority?

FWIW, increasing the priority of the `completion' overlay does not cause
widget file name completion to fail on GNU/Linux.  Could you try on
Windows?