Subject: Re: bug#27647: 26.0.50; Line numbers implemented natively disappear momentarily when frame out of focus

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Jul 2017 17:44:26 +0300

> From: Kaushal Modi <[email-masked]>
> Date: Tue, 11 Jul 2017 20:08:47 +0000
> Cc: [email-masked]
> 
> This is what I see (I was able to record the moment when the lines reappeared on clicking anywhere in the
> window): http://i.imgur.com/5C5FmGS.gifv
> 
> When the above happened, the point was in a Fundamental Mode buffer window and the other window had
> this file in emacs-lisp-mode. I do not have display-line-numbers set to t globally; so fundamental-mode has
> that value at nil and the elisp window had that set to t. Again the line num disappearance happened when the
> emacs frame was out of focus.
> 
> Interestingly the variable watcher did not get triggered.

I guess the variable gets changed by one of the ways that Lisp-level
watchers cannot catch.

> Does anything look problematic in the above code from a quick glance.

Not at a glance.  But the key to this mystery is most probably in your
customizations.  Some code which probably runs off a timer or some X
event does something that directly or indirectly resets the variable
in that buffer.  Maybe you have some code which directly or indirectly
calls kill-all-local-variables, for example.  Or something else to
that effect.

You could add logging to your functions that turn off the line
numbers, and see what's in the log when this happens.