GNU bug report logs - #27427
26.0.50; Native line numbers lead to display error in company-mode popup

Previous Next

Package: emacs;

Reported by: Alexander Miller <alexanderm <at> web.de>

Date: Mon, 19 Jun 2017 16:51:02 UTC

Severity: normal

Found in version 26.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: alexanderm <at> web.de, 27427 <at> debbugs.gnu.org
Subject: Re: bug#27427: 26.0.50; Native line numbers lead to display error in
 company-mode popup
Date: Fri, 14 Jul 2017 10:04:42 +0300
> Cc: alexanderm <at> web.de, 27427 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Fri, 14 Jul 2017 09:24:58 +0300
> 
> > No, it isn't brittle.  What are you struggling to understand?  Maybe I
> > can help.
> 
> To get the value of the current column, Emacs needs to trigger 
> redisplay, right? To know how many columns the numbers take up. Then it 
> has to redisplay again before the user sees the result.
> 
> So I'm surprised Emacs knows it needs to perform two redisplays just 
> because I bound display-line-numbers to nil temporarily.

That's because posn-at-point "simulates" redisplay: it performs all
the layout calculations exactly like redisplay would, but without
actually displaying anything.  Otherwise, how would posn-at-point be
able to return you the information you request, even when there are no
line numbers?

(If you think posn-at-point takes that information from what is
displayed on the glass, or from some of its internal representation,
then that's not what it does, because the internal representation of
what's on the glass is many times outdated when a Lisp program runs,
so it cannot be trusted.)




This bug report was last modified 7 years and 314 days ago.

Previous Next


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