GNU bug report logs - #18504
24.3.93; posn-at-point intermittently returns wrong value for a valid buffer position

Previous Next

Package: emacs;

Reported by: Dmitry <dgutov <at> yandex.ru>

Date: Fri, 19 Sep 2014 01:02:02 UTC

Severity: normal

Found in version 24.3.93

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #55 received at 18504-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18504-done <at> debbugs.gnu.org
Subject: Re: bug#18504: 24.3.93;	posn-at-point intermittently returns wrong
 value for a valid buffer	position
Date: Tue, 23 Sep 2014 22:39:49 +0400
On 09/20/2014 11:13 AM, Eli Zaretskii wrote:

> This happens when posn-at-point is called with the company-mode
> overlay still (or already?) in place at that position.  That overlay
> has the invisible property, so it hides the buffer text starting at
> the position with which you call posn-at-point.  Therefore,
> posn-at-point returns information about the first visible buffer
> position after the overlay string.

I see, thanks. But does the fact that we get a different return value 
with different values of bidi-display-reordering, look right to you?

> So I think you need to make sure inside company--col-row that the
> overlay is popped down, before you call posn-at-point.  Evidently, in
> some scenarios it isn't.

Yes, seems to be a bug with the way we set the "current" keymap when 
completion is performed (the popup is displayed only during that time). 
Thank you for confirming, I'm looking into it.

> The buffer position returned by
> posn-at-point can serve as your control variable: if it is different
> from the position that is the argument to company--col-row, you have
> this situation.

Ok. I can just directly check if the overlay has the `invisible' 
property set to t or not, though. We keep a reference to the overlay.




This bug report was last modified 10 years and 248 days ago.

Previous Next


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