GNU bug report logs - #6830
widget-complete bad completions in :type 'file

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 9 Aug 2010 11:46:01 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #88 received at 6830 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 6830 <at> debbugs.gnu.org, cyd <at> gnu.org
Subject: Re: bug#6830: widget-complete bad completions in :type 'file
Date: Fri, 09 Mar 2012 11:35:23 -0500
>> so using either would be fine.
> ??? I don't understand this part.  It maybe OK in this particular
> case, because all you care about is the range of buffer positions
> covered by the overlay.

That's normally the case.  If an application actually cares about which
value of `field' shows up, it'll have to do more work.

>> Now, until here, there's still no bug because indeed it doesn't matter
>> which overlay we use to determine the field.
> See above.  I'm not sure this is correct in general.  And what if one
> of the overlays covers more buffer positions than the other?  Wouldn't
> it sometimes confuse the completion code?

The normal priority rules say that a smaller overlay normally takes
priority, but yes, if there's a small field already defined within the
completion region, then the completion code can become confused.
I don't know how likely this is.

>> Does the patch below fix the problem?
> It does, but on Windows both `before_field' and `field' now have the
> value of the widget, not of `completion'.
> More generally, the overlay returned by get-char-property-and-overlay
> in this situation is still arbitrary after your change, and the Lisp
> application still has no control on which one will be returned.

It has the same control as before: the use of the `priority' property.


        Stefan




This bug report was last modified 13 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.