Subject: bug#36283: 27.0.50; hl-line-mode updates the wrong window after clone-indirect-buffer

From: Matthew Newton <[email-masked]>
Date: Tue, 18 Jun 2019 11:18:54 -0700

In GUI Emacs on MacOS:

emacs -Q
M-x hl-line-mode
C-p
M-x clone-indirect-buffer
C-p

The highlighted line moves in the inactive window and does not move in the active window.

I tested this on Emacs 24.5 from https://emacsformacosx.com/ so it doesn’t appear to be recent or specific to my build.

Note that if global-hl-line-mode is active, it works as expected, highlighting the line in the active window. 

Many thanks,
Matt

In GNU Emacs 27.0.50 (build 8, x86_64-apple-darwin18.6.0, NS appkit-1671.50 Version 10.14.5 (Build 18F132))
of 2019-06-17 built on crab
Repository revision: 44a086e5ccb920bb5a310079130ce1eaabdfe4ce
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.5

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Hl-Line mode enabled in current buffer

Configured using:
'configure --without-dbus --without-pop --with-gnutls --with-ns
--disable-ns-self-contained --with-rsvg --with-imagemagick --with-xml2
--with-modules '--program-transform-name=s/^ctags$/ctags.emacs/'
'CFLAGS=-Ofast -march=native -pipe -falign-functions=64
-fomit-frame-pointer -funit-at-a-time -fforce-addr -mfpmath=sse
-ffast-math -fno-finite-math-only -fstack-check -I
/usr/local/opt/libxml2/include/libxml2''

Configured features:
IMAGEMAGICK NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS PDUMPER LCMS2 GMP

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  hl-line-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
hl-line elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win 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 threads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 43915 6112)
(symbols 48 5826 1)
(strings 32 14868 1748)
(string-bytes 1 493078)
(vectors 16 8916)
(vector-slots 8 108184 10888)
(floats 8 18 20)
(intervals 56 207 0)
(buffers 992 12))