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

classic Classic list List threaded Threaded
63 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
Hello,

I use the new native line number display feature in this fashion:

=====
(defconst modi/linum-mode-hooks '(verilog-mode-hook
                                  emacs-lisp-mode-hook
                                  cperl-mode-hook
                                  c-mode-hook
                                  python-mode-hook
                                  matlab-mode-hook
                                  sh-mode-hook
                                  web-mode-hook
                                  html-mode-hook
                                  css-mode-hook
                                  makefile-gmake-mode-hook
                                  tcl-mode-hook
                                  conf-space-mode-hook
                                  d-mode-hook
                                  sml-mode-hook
                                  nim-mode-hook
                                  yaml-mode-hook)
  "List of hooks of major modes in which a “linum” mode should be enabled.") ;I know I should switch to using prog-mode-hook at some point

(defun modi/native-linum-absolute ()
  "Set buffer-local variable `display-line-numbers' to t."
  (interactive)
  (setq display-line-numbers t))

(defun modi/turn-on-native-linum ()
  "Turn on native line numbers in specific modes."
  (interactive)
  (if modi/linum-mode-enable-global
      (progn
        (dolist (hook modi/linum-mode-hooks)
          (remove-hook hook #'modi/native-linum-absolute))
        (setq-default display-line-numbers t))
    (progn
      (when global-linum-mode
        (setq-default display-line-numbers nil))
      (dolist (hook modi/linum-mode-hooks)
        (add-hook hook #'modi/native-linum-absolute)))))

(modi/turn-on-native-linum)
=====

The full linum management code is here[1]; above is just the relevant part from that.

It works.

But seemingly randomly, the line numbers disappear when the emacs frame is not in focus.

I do not know if my setup has to do with this but here are the details:

- I build emacs master on RHEL 6.6.
- I access the RHEL machine via VNC on Windows 7 Enterprise (work)
- Occasionally I would venture into Windows to get work email (Outlook) or to the Chrome browwer in Windows.
- With the way my monitors are set up, one monitor would should the VNC window showing the emacs frame and another monitor would should Outlook.

Then as I would be working on something in Outlook, I would see from the corner of my eye that the line numbers disappeared from the emacs window with code in verilog-mode. Clicking again on the emacs frame (in VNC, remember) would bring the line numbers back.

As I mentioned on emacs-devel, I cannot recreate this behavior and so cannot come up with steps to recreate this on emacs -Q.

How can I help debug this otherwise:
- Can I add something locally to the C code so that certain hooks get triggered when the line numbers display is turned on/off?


In GNU Emacs 26.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2017-07-10
Repository revision: 0440c748aaec9b8b32c8cb268f6e24e874fedc75
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6 (Santiago)

Recent messages:
Finished reverting buffers containing unmodified files.
Desktop saved in ~/.emacs.d/
Note: file is write protected
Mark set
Note: file is write protected

Configured using:
 'configure --with-modules
 --prefix=/home/kmodi/usr_local/apps/6/emacs/master
 '--program-transform-name=s/^ctags$/ctags_emacs/'
 'CPPFLAGS=-I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
 -I/usr/include' 'CFLAGS=-ggdb3 -O0' 'CXXFLAGS=-ggdb3 -O0'
 'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64
 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Verilog

Minor modes in effect:
  ace-window-display-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  yas-minor-mode: t
  minibuffer-line-mode: t
  flyspell-mode: t
  which-key-mode: t
  ivy-mode: t
  projectile-mode: t
  global-hardcore-mode: t
  hardcore-mode: t
  modi/verilog-do-not-read-includes-defines-mode: t
  desktop-save-mode: t
  save-place-mode: t
  minibuffer-depth-indicate-mode: t
  winner-mode: t
  smart-mark-mode: t
  delete-selection-mode: t
  which-function-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  rainbow-delimiters-mode: t
  global-page-break-lines-mode: t
  outline-minor-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  global-hungry-delete-mode: t
  hungry-delete-mode: t
  volatile-highlights-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  diff-auto-refine-mode: t
  global-git-commit-mode: t
  recentf-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  engine-mode: t
  beacon-mode: t
  shackle-mode: t
  mode-line-space-mode: t
  display-time-mode: t
  ctags-auto-update-mode: t
  ggtags-mode: t
  modi-mode: t
  override-global-mode: t
  show-paren-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)
  abbrev-mode: t

Load-path shadows:
/home/kmodi/.emacs.d/elisp/verilog-mode/verilog-mode hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/progmodes/verilog-mode
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-macro hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-macro
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-texinfo hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-texinfo
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-publish hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-publish
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-org hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-org
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-odt hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-odt
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-md hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-md
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-man hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-man
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-latex hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-latex
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-icalendar hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-icalendar
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-html hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-html
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-list hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-list
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-bbdb hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-bbdb
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-attach hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-attach
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-shen hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-shen
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-shell hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-shell
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-js hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-js
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-haskell hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-haskell
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-faces hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-faces
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-beamer hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-beamer
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-w3m hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-w3m
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ox-ascii hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ox-ascii
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-table hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-table
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-python hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-python
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-timer hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-timer
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-table hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-table
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-src hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-src
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-rmail hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-rmail
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-protocol hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-protocol
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-plot hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-plot
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-pcomplete hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-pcomplete
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-mouse hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-mouse
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-mobile hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-mobile
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-mhe hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-mhe
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-macs hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-macs
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-lint hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-lint
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-irc hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-irc
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-inlinetask hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-inlinetask
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-info hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-info
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-indent hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-indent
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-id hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-id
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-habit hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-habit
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-gnus hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-gnus
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-footnote hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-footnote
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-feed hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-feed
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-eww hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-eww
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-eshell hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-eshell
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-entities hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-entities
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-element hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-element
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-docview hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-docview
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-datetree hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-datetree
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-ctags hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-ctags
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-crypt hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-crypt
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-compat hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-compat
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-colview hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-colview
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-clock hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-clock
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-capture hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-capture
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-bibtex hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-bibtex
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-archive hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-archive
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-agenda hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-agenda
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-tangle hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-tangle
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-stan hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-stan
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-sqlite hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-sqlite
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-sql hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-sql
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-sed hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-sed
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-screen hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-screen
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-fortran hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-fortran
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-scheme hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-scheme
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-scala hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-scala
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-sass hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-sass
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ruby hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ruby
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-R hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-R
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ref hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ref
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-processing hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-processing
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-plantuml hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-plantuml
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-picolisp hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-picolisp
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-perl hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-perl
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-org hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-org
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-octave hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-octave
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ocaml hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ocaml
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-mscgen hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-mscgen
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-maxima hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-maxima
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-matlab hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-matlab
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-makefile hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-makefile
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-lua hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-lua
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-lob hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-lob
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-lisp hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-lisp
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-lilypond hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-lilypond
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ledger hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ledger
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-latex hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-latex
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-keys hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-keys
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-J hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-J
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-java hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-java
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-io hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-io
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-groovy hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-groovy
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-gnuplot hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-gnuplot
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-forth hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-forth
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-exp hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-exp
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-eval hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-eval
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-emacs-lisp hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-emacs-lisp
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ebnf hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ebnf
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-dot hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-dot
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-ditaa hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-ditaa
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-css hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-css
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-core hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-core
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-coq hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-coq
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-comint hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-comint
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-clojure hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-clojure
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-C hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-C
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-asymptote hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-asymptote
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-calc hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-calc
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-awk hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-awk
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-version hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-version
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-loaddefs hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-loaddefs
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/org-install hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/org-install
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/ob-abc hides /home/kmodi/usr_local/apps/6/emacs/master/share/emacs/26.0.50/lisp/org/ob-abc

Features:
(shadow sort mail-extr emacsbug sendmail expand-region
text-mode-expansions cc-mode-expansions the-org-mode-expansions
js-mode-expansions web-mode-expansions html-mode-expansions
css-mode-expansions er-basic-expansions expand-region-core
expand-region-custom mc-mark-more multiple-cursors-core rect web-mode
mhtml-mode css-mode js cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode ox-hugo
ox-blackfriday ox-md ox-minutes ox-twbs ox-reveal ox-html-fancybox
ox-latex ox-html table ox-ascii ox-publish ox drag-stuff info-look
two-column vc-annotate whitespace eieio-opt speedbar sb-image ezimage
dframe ace-window avy smex ido bug-reference warnings log-view
magit-submodule magit-obsolete magit-blame magit-stash magit-bisect
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-branch magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip misearch multi-isearch mm-archive network-stream
starttls url-http tls gnutls url-gw nsm url-cache url-auth paradox
paradox-menu paradox-commit-list paradox-execute paradox-github
paradox-core spinner xsos-fns sos-fns vc-mtn vc-hg org-table
markdown-mode eww mm-url gnus nnheader time-stamp vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs copyright cursor-sensor colir color counsel
esh-util swiper tabify org-datetree org-eldoc org-indent org-info
org-capture auto-complete-config setup-desktop header2 iso-transl
jka-compr fill-column-indicator conf-mode csh-mode sh-script smie
executable flycheck flymake auto-complete popup yasnippet tramp
tramp-compat tramp-loaddefs trampver ucs-normalize parse-time
minibuffer-line flyspell ispell which-key ivy-hydra ivy ivy-overlay ffap
ibuffer-projectile projectile grep ibuf-ext ibuffer ibuffer-loaddefs
hardcore-mode vc-git verilog-mode desktop frameset
setup-pragmata-ligatures setup-font-check smyx-theme diff-hl vc-dir vc
vc-dispatcher setup-misc saveplace setup-personal my-patches setup-meme
setup-work setup-windows-buffers mb-depth winner setup-unicode
setup-toggles setup-spell setup-search setup-registers setup-print
setup-pdf setup-navigation setup-mouse setup-launcher setup-image
setup-editing smart-mark unfill zop-to-char delsel setup-compile
setup-backup setup-yaml-mode setup-web-mode setup-verilog setup-toml
setup-hugo setup-tcl setup-sml setup-spice setup-shell setup-python
setup-perl setup-nim setup-matlab setup-markdown setup-latex
preview-latex tex-site auto-loads setup-elisp easy-escape setup-conf
setup-clojure setup-yasnippet setup-xkcd setup-writegood writegood-mode
setup-wrap-region wrap-region setup-wordnut setup-wolfram
setup-which-key setup-which-func which-func imenu setup-weather
setup-undo-tree undo-tree diff setup-tldr setup-tiny setup-term setup-sx
setup-smex setup-server setup-rainbow-mode setup-rainbow-delimiters
rainbow-delimiters setup-projectile setup-poporg setup-pomodoro
setup-pcache pcache eieio-base cl setup-page-break-lines disp-table
page-break-lines setup-outshine foldout outshine outshine-org-cmds
outorg org-sticky-header org-include-img-from-archive
org-include-img-from-pdf org-include-src-lines ob-org ob-latex ob-dot
ob-ditaa ob-plantuml ob-awk ob-python ob-shell org-link-ref elfeed-link
org-element elfeed-show elfeed-search bookmark pp shr svg dom elfeed-csv
elfeed elfeed-curl url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf mailcap elfeed-log elfeed-db
elfeed-lib url-util avl-tree url-queue browse-url xml-query xml org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs noutline outline
setup-orgstruct setup-org setup-news setup-neotree
setup-multiple-cursors setup-manage-minor-mode setup-linum nlinum linum
setup-kurecolor setup-keyfreq keyfreq setup-info info+ thingatpt
setup-indent-guide setup-imenu-list setup-ivy setup-ibuffer
setup-hungry-delete hungry-delete setup-htmlize setup-highlight hl-line+
hl-line volatile-highlights hi-lock setup-header2 setup-hardcore
setup-magit magit-log magit-diff smerge-mode diff-mode git-commit
recentf tree-widget log-edit message subr-x puny dired+ image-dired
image-mode image-file help-fns+ wid-edit help-fns radix-tree dired-aux
dired-x dired dired-loaddefs rfc822 mml mml-sec epa derived epg
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-process with-editor shell
pcomplete server magit-margin magit-mode magit-git magit-section
magit-utils crm magit-popup async-bytecomp async format-spec
setup-git-timemachine setup-git-link setup-diff setup-gist
setup-flycheck setup-fold yafolding fold-this setup-fci
setup-expand-region setup-engine-mode engine-mode setup-el2markdown
setup-eww setup-emamux setup-elfeed setup-drag-stuff setup-dired
setup-deft setup-de-ansify setup-counsel setup-command-log-mode
setup-calc setup-buffer-move setup-bookmarks setup-beacon beacon
setup-auto-complete setup-artist setup-all setup-ag setup-ace-window
setup-abbrev setup-shackle shackle setup-visual generic setup-mode-line
smart-mode-line-dark-theme smart-mode-line rich-minority time setup-tags
ctags-update ggtags etags xref project compile comint ansi-color ewoc
pcase setup-hydra hydra ring lv setup-key-chord
setup-region-bindings-mode region-bindings-mode cl-extra help-mode
setup-paradox temp-mode modi-mode use-package-chords bind-chord
key-chord use-package diminish bind-key easy-mmode benchmark-init advice
setup-packages gh-common gh-profile rx s marshal eieio-compat ht json
map dash finder-inf info edmacro kmacro package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib general time-date paren cus-start
cus-load setup-var-overrides mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1183215 148637)
 (symbols 48 67796 6)
 (miscs 40 3522 2777)
 (strings 32 513032 17874)
 (string-bytes 1 20726162)
 (vectors 16 107472)
 (vector-slots 8 2530595 135460)
 (floats 8 1157 1484)
 (intervals 56 11547 29183)
 (buffers 976 143)
 (heap 1024 296711 191906))

--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Kaushal Modi <[hidden email]>
> Date: Mon, 10 Jul 2017 20:52:49 +0000
>
> - I build emacs master on RHEL 6.6.
> - I access the RHEL machine via VNC on Windows 7 Enterprise (work)
> - Occasionally I would venture into Windows to get work email (Outlook) or to the Chrome browwer in
> Windows.
> - With the way my monitors are set up, one monitor would should the VNC window showing the emacs frame
> and another monitor would should Outlook.
>
> Then as I would be working on something in Outlook, I would see from the corner of my eye that the line
> numbers disappeared from the emacs window with code in verilog-mode. Clicking again on the emacs frame
> (in VNC, remember) would bring the line numbers back.

When you say "line numbers disappeared", do you mean as if you set
display-line-numbers to nil, i.e. the text starts at the left edge of
the window?  Or do you mean that there's still the line-number field
to the left of the text, but it is empty instead of showing the
numbers?



Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
On Mon, Jul 10, 2017, 10:38 PM Eli Zaretskii <[hidden email]> wrote:

When you say "line numbers disappeared", do you mean as if you set
display-line-numbers to nil, i.e. the text starts at the left edge of
the window?  

Yes. Exactly. And they reappear automatically too once that window is in focus again. 

I enable the line numbers via only major mode hooks, for some major modes. I am not 100% sure but each time this has happened, probably one window had a buffer with a major mode where the line numbers should be enabled, and the other didn't (I normally work in a 2-window frame). But also, I have never been able to recreate the problem.
--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Kaushal Modi <[hidden email]>
> Date: Tue, 11 Jul 2017 03:43:07 +0000
> Cc: [hidden email]
>
>  When you say "line numbers disappeared", do you mean as if you set
>  display-line-numbers to nil, i.e. the text starts at the left edge of
>  the window?
>
> Yes. Exactly. And they reappear automatically too once that window is in focus again.

In that case, I suspect that some of your customizations somehow
temporarily reset display-line-numbers to nil.  You could try to use
Lisp watchpoints (see "Watching Variables" in the ELisp manual) for a
single buffer where this happens, to find out which code does that.

Alternatively, instrument your functions that reset
display-line-numbers to log messages to some buffer with useful
information, such as the Lisp backtrace, and when the problem happens,
examine the log for clues.



Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
On Tue, Jul 11, 2017 at 10:31 AM Eli Zaretskii <[hidden email]> wrote:
In that case, I suspect that some of your customizations somehow
temporarily reset display-line-numbers to nil.  You could try to use
Lisp watchpoints (see "Watching Variables" in the ELisp manual) for a
single buffer where this happens, to find out which code does that.

Alternatively, instrument your functions that reset
display-line-numbers to log messages to some buffer with useful
information, such as the Lisp backtrace, and when the problem happens,
examine the log for clues.

I will set up the Lisp watchpoints and debug more, thanks.

I have one more data point. Apparently I do not need to "click" on the emacs frame to make the line numbers reappear. They reappeared seemingly randomly or just as I was just hovering the mouse over the emacs frame.. odd.  This happened just as I was preparing to record "line num reappearance on click" effect, but the line numbers reappeared by themselves even before I clicked. 
--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
On Tue, Jul 11, 2017 at 10:38 AM Kaushal Modi <[hidden email]> wrote:

I will set up the Lisp watchpoints and debug more, thanks.

I have one more data point. Apparently I do not need to "click" on the emacs frame to make the line numbers reappear. They reappeared seemingly randomly or just as I was just hovering the mouse over the emacs frame.. odd.  This happened just as I was preparing to record "line num reappearance on click" effect, but the line numbers reappeared by themselves even before I clicked.

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.

This is how I set the watcher:

=====
(defvar modi/variables-to-be-watched '(display-line-numbers)
  "List of variables to be watched.
Used by `modi/set-variable-watchers' and
`modi/unset-variable-watchers'")

(defun modi/variable-watcher-fn (symbol newval operation where)
  "Print message when the value of variable SYMBOL changes.
The message shows the NEWVAL it changed to, the OPERATION that
caused that, and the buffer WHERE that happened if the value
change was buffer-local."
  (message (format "[Watcher: %s] Now set to %S, by `%S'%s"
                   (symbol-name symbol)
                   newval
                   operation
                   (if where
                       (format " in %S" where)
                     ""))))

(defun modi/set-variable-watchers ()
  "Enable printing messages when any watched variable changes.
The variables to be watched should be added to
`modi/variables-to-be-watched'."
  (interactive)
  (dolist (var modi/variables-to-be-watched)
    (add-variable-watcher var #'modi/variable-watcher-fn)))

(modi/set-variable-watchers)
=====

When I revert-buffer in an emacs-lisp-mode file, I see these:

[Watcher: display-line-numbers] Now set to nil, by ‘makunbound’ in #<buffer setup-linum.el>
[Watcher: display-line-numbers] Now set to nil, by ‘set’ in #<buffer setup-linum.el>
[Watcher: display-line-numbers] Now set to t, by ‘set’ in #<buffer setup-linum.el>

But none of those [Watcher:..] messages showed up when the line numbers auto-disappeared and also when re-appeared on the click in the buffer.

Not sure if this would help, but here is how I enable the line numbers (modified compared to the version I posted earlier in this thread):

=====
(defvar modi/native-linum-default t
  "Value set for `display-line-numbers' when enabled.
Valid values are t, `visual', `relative' and nil. See
`display-line-numbers' for more information.")

(defun modi/native-linum--on (&optional global)
  "Enable native line number display in the current buffer.
If GLOBAL is non-nil, enable this globally."
  (interactive "P")
  (if global
      (setq-default display-line-numbers modi/native-linum-default)
    (setq-local display-line-numbers modi/native-linum-default)))

(defun modi/native-linum--off (&optional global)
  "Disable native line number display in the current buffer.
If GLOBAL is non-nil, disable this globally."
  (interactive "P")
  (if global
      (setq-default display-line-numbers nil)
    (setq-local display-line-numbers nil)))

(defun modi/turn-on-native-linum ()
  "Turn on native line numbers in specific modes.
In enabled state, `display-line-numbers' is set to
`modi/native-linum-default'."
  (interactive)
  (if modi/linum-mode-enable-global
      (progn
        (dolist (hook modi/linum-mode-hooks)
          (remove-hook hook #'modi/native-linum--on))
        (modi/native-linum--on :global))
    (progn
      (modi/native-linum--off :global)
      (dolist (hook modi/linum-mode-hooks)
        (add-hook hook #'modi/native-linum--on)))))

(defun modi/linum--enable (&optional frame)
  "Set “linum” using the default package set by the user in
`modi/linum-fn-default'.

The optional FRAME argument is added as it is needed if this
function is added to the `after-make-frame-functions' hook."
  (modi/turn-on-native-linum))

(if (daemonp)
    (add-hook 'after-make-frame-functions #'modi/linum--enable)
  (add-hook 'after-init-hook #'modi/linum--enable))
=====

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


--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Kaushal Modi <[hidden email]>
> Date: Tue, 11 Jul 2017 20:08:47 +0000
> Cc: [hidden email]
>
> 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.



Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
Hello,

On Wed, Jul 12, 2017 at 10:44 AM Eli Zaretskii <[hidden email]> wrote:
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.

I am still trying to find out what is doing that if something is doing that. Unfortunately no message statement inserted anywhere in my native linum enabling code is getting executed when this anomaly happens.
 
You could add logging to your functions that turn off the line
numbers, and see what's in the log when this happens.

None of those message statements gets triggered.

I have a feeling that this is happening due to some state change at system/GTK2 level.. because no messages in elisp are catching the line number toggling, and this happens when I move the focus out of the VNC viewer window to Windows. When I return to the VNC viewer and click on the window with the missing line numbers, they show up magically.

You would have a better idea if there are any hooks in display engine that get affected by GTK..
 
--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Kaushal Modi <[hidden email]>
> Date: Wed, 19 Jul 2017 15:13:31 +0000
> Cc: [hidden email]
>
> I am still trying to find out what is doing that if something is doing that. Unfortunately no message statement
> inserted anywhere in my native linum enabling code is getting executed when this anomaly happens.
>
>  You could add logging to your functions that turn off the line
>  numbers, and see what's in the log when this happens.
>
> None of those message statements gets triggered.

I'd begin by removing your line-number setup and replacing it with a
much simpler one, which doesn't involve linum/nlinum, and instead
simply sets display-line-numbers.

If that doesn't help, I'd go on bisecting your customizations.

Alternatively, a reproducing recipe would be useful.

> You would have a better idea if there are any hooks in display engine that get affected by GTK..

None that I know of, sorry, not hooks which could somehow reset an
Emacs Lisp variable.



Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky-2
In reply to this post by Eli Zaretskii
On Wed, Jul 12, 2017 at 10:44 AM, Eli Zaretskii <[hidden email]> wrote:

>> From: Kaushal Modi <[hidden email]>
>> Date: Tue, 11 Jul 2017 20:08:47 +0000
>> Cc: [hidden email]
>>
>> 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.

Perhaps 'watch Vdisplay_line_numbers' in gdb would help?



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Noam Postavsky <[hidden email]>
> Date: Wed, 19 Jul 2017 13:52:28 -0400
> Cc: Kaushal Modi <[hidden email]>, [hidden email]
>
> Perhaps 'watch Vdisplay_line_numbers' in gdb would help?

I thought about that, but I'm afraid it could cause an infinite series
of unrelated hits, each time Kaushal switches between buffers.  It may
make editing impractical.

But if I'm mistaken, why not?



Reply | Threaded
Open this post in threaded view
|

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

jonas
In reply to this post by Kaushal Modi
I can replicate this behavior using flycheck and flycheck-pos-tip enabled.
Place mark at anything marked with a squiggly line, wait for the pop up,
1-2 seconds later
line numbers disappear.

Using  GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.18.9) of 2017-07-17




Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: jonas <[hidden email]>
> Date: Fri, 21 Jul 2017 19:49:19 +0200
>
> I can replicate this behavior using flycheck and flycheck-pos-tip enabled.
> Place mark at anything marked with a squiggly line, wait for the pop up,
> 1-2 seconds later
> line numbers disappear.

Can you provide a detailed recipe, please?  I don't use flycheck, so I
don't think I understand how to reproduce the problem.

Thanks.



Reply | Threaded
Open this post in threaded view
|

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

Kaushal Modi
In reply to this post by Eli Zaretskii
On Wed, Jul 19, 2017 at 2:10 PM Eli Zaretskii <[hidden email]> wrote:
I thought about that, but I'm afraid it could cause an infinite series
of unrelated hits, each time Kaushal switches between buffers.  It may
make editing impractical.

But if I'm mistaken, why not?

Hi Eli, Noam,

As you know from my other thread, I am unable to use gdb. As I don't know enough C to hack it myself, can you provide pointers to where I can put print statements or something like that in the C code directly to help with this debug?

Another thing, debbugs seems to have stopped emailing the bug authors!

Emails sent to just this debbugs don't reach me, like this reply[1] or this[2]. Can you guys please CC me on further replies?

@Jonas: Any luck creating a recipe for this?

@Eli: This problem is consistent, though not consistent enough to yet create a recipe. But it does happen at least once a day. I am still sticking on to native line numbers and not giving up. Can this be please made a blocker for 26.1?


--

Kaushal Modi

Reply | Threaded
Open this post in threaded view
|

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

jonas

Unfortunately, no. The issue is consistent, but I had difficulties creating a detailed recipe for it.

For me, the issue was limited to flycheck-pos-tip which interacts with the windowing system through the pos-tip package. No modification of display-line-numbers took place.

I ended up replacing the package with flycheck-popup-tip, which displays its information inside an emacs buffer, and the problem disappeared. So at a glance the issue seem to be deeper than just being config-related, but I am not knowledgeable enough to draw any real conclusions.


On 2017-10-05 14:40, Kaushal Modi wrote:
On Wed, Jul 19, 2017 at 2:10 PM Eli Zaretskii <[hidden email]> wrote:
I thought about that, but I'm afraid it could cause an infinite series
of unrelated hits, each time Kaushal switches between buffers.  It may
make editing impractical.

But if I'm mistaken, why not?

Hi Eli, Noam,

As you know from my other thread, I am unable to use gdb. As I don't know enough C to hack it myself, can you provide pointers to where I can put print statements or something like that in the C code directly to help with this debug?

Another thing, debbugs seems to have stopped emailing the bug authors!

Emails sent to just this debbugs don't reach me, like this reply[1] or this[2]. Can you guys please CC me on further replies?

@Jonas: Any luck creating a recipe for this?

@Eli: This problem is consistent, though not consistent enough to yet create a recipe. But it does happen at least once a day. I am still sticking on to native line numbers and not giving up. Can this be please made a blocker for 26.1?


--

Kaushal Modi


Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
In reply to this post by Kaushal Modi
> From: Kaushal Modi <[hidden email]>
> Date: Thu, 05 Oct 2017 12:40:35 +0000
> Cc: [hidden email], [hidden email]
>
> As you know from my other thread, I am unable to use gdb. As I don't know enough C to hack it myself, can
> you provide pointers to where I can put print statements or something like that in the C code directly to help
> with this debug?

I couldn't think of anything useful.  Which is not surprising, as I
have no idea what could be involved in this.

> @Eli: This problem is consistent, though not consistent enough to yet create a recipe. But it does happen at
> least once a day. I am still sticking on to native line numbers and not giving up. Can this be please made a
> blocker for 26.1?

I don't think it's an Emacs bug.  It's most probably something related
to some hook or timer that you set up in your customizations.  That's
the only way a frame without a focus could get redrawn.  So please
look through all of your customizations to find the one that is
responsible.



Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> From: Eli Zaretskii <[hidden email]>
> Cc: [hidden email], [hidden email],
> [hidden email]
>
> It's most probably something related to some hook or timer that you
> set up in your customizations.

Or maybe some feature calls kill-all-local-variables, but doesn't
restore display-line-numbers until later.



Reply | Threaded
Open this post in threaded view
|

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

Romanos Skiadas


On 05/10/17 14:39, Eli Zaretskii wrote:

>> From: Eli Zaretskii <[hidden email]>
>> Cc: [hidden email], [hidden email],
>> [hidden email]
>>
>> It's most probably something related to some hook or timer that you
>> set up in your customizations.
> Or maybe some feature calls kill-all-local-variables, but doesn't
> restore display-line-numbers until later.
>
>
>
I have been seeing this problem for a while due to something happening
with flycheck-pos-tip, like in the original report. I disabled the
package, but today I started seeing it (or could it be something
different?) again in a buffer. It's far from a recipe, but I was seeing
this:

- In a buffer, the line numbers looked like attached screenshot (1)
- in a buffer, I pressed any combination of keys that would cause
which-key to pop up
- I pressed C-g to close which-key. At this point, the line numbers
would look like screenshot (2). They don't go away per se, it looks like
something goes wrong in some calculation maybe?
- Pressing C-g restored the line numbers to state (1)

I played with adding debug-watch to a couple of variables, this was a
few hours ago so I only remember I did it with display-line-numbers and
nothing showed up. I also did debug-on-entry on
kill-all-local-variables, it never gets called.

After playing with the buffer for a while, I found out that this
behaviour goes away with git-gutter-mode disabled. I'll find some time
to try to get something reproducible with stock Emacs within the next
couple of days.

@Eli, I still have the buffer around and can try out things. Do you have
any debugging hints for this?

Best,
Romanos

line_numbers_2.png (1K) Download Attachment
line_numbers_1.png (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Eli Zaretskii
> Cc: [hidden email], [hidden email],
>  [hidden email]
> From: Romanos Skiadas <[hidden email]>
> Date: Thu, 5 Oct 2017 23:17:30 +0100
>
> - In a buffer, the line numbers looked like attached screenshot (1)
> - in a buffer, I pressed any combination of keys that would cause
> which-key to pop up
> - I pressed C-g to close which-key. At this point, the line numbers
> would look like screenshot (2). They don't go away per se, it looks like
> something goes wrong in some calculation maybe?
> - Pressing C-g restored the line numbers to state (1)

This is not "line numbers disappearing", this is something else.  Can
you show a larger portion of the window, including the text to the
right of the numbers in the 2nd case?

> After playing with the buffer for a while, I found out that this
> behaviour goes away with git-gutter-mode disabled. I'll find some time
> to try to get something reproducible with stock Emacs within the next
> couple of days.

Thanks.  I tried loading git-gutter, but saw no problems with line
numbers.  So I guess it isn't just that package, but some interaction
between it and other packages.

> @Eli, I still have the buffer around and can try out things. Do you have
> any debugging hints for this?

I might have ideas once I see a larger view of the problematic
display.  E.e., where there any display margins to the left of the
numbers?



Reply | Threaded
Open this post in threaded view
|

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

Romanos Skiadas
In reply to this post by Eli Zaretskii



On 05/10/17 14:10, Eli Zaretskii wrote:
From: Kaushal Modi [hidden email]
Date: Thu, 05 Oct 2017 12:40:35 +0000
Cc: [hidden email], [hidden email]

As you know from my other thread, I am unable to use gdb. As I don't know enough C to hack it myself, can
you provide pointers to where I can put print statements or something like that in the C code directly to help
with this debug?
I couldn't think of anything useful.  Which is not surprising, as I
have no idea what could be involved in this.

@Eli: This problem is consistent, though not consistent enough to yet create a recipe. But it does happen at
least once a day. I am still sticking on to native line numbers and not giving up. Can this be please made a
blocker for 26.1?
I don't think it's an Emacs bug.  It's most probably something related
to some hook or timer that you set up in your customizations.  That's
the only way a frame without a focus could get redrawn.  So please
look through all of your customizations to find the one that is
responsible.
Evil is very probably doing something funky like this. I started seeing line-numbers disappearing completely again, not partially as I mentioned at some point in the thread, with flycheck-pos-tip disabled. Turns out it was some interaction between flyspell's overlays & evil. A recipe to reliably reproduce this with evil is:

echo "foo" > /tmp/test.txt

(cd /tmp && git clone https://github.com/emacs-evil/evil)

Add this to a file, eg /tmp/test-init.el:

(add-hook 'text-mode-hook (lambda () (display-line-numbers-mode)))
(add-to-list 'load-path "/tmp/evil")
(require 'evil)
(evil-mode 1)

 emacs -Q -l /tmp/test-init.el /tmp/test.txt

Put this in the test.txt buffer an eval it:
(let ((overlay (make-overlay 1 6 nil t nil))) ;; flyspell does this on misspelled words
  (overlay-put overlay 'help-echo "a"))

Make sure you are in normal more (press ESC)
Move the mouse above the f at the start of the buffer and hover until the "a" shows up.
Click and drag along toward to end of the line. The line numbers consistently go away with this recipe for me.

I'll start dissecting evil to see what causes this.

Best,
Romanos
1234