GNU bug report logs - #36283
27.0.50; hl-line-mode updates the wrong window after clone-indirect-buffer

Previous Next

Package: emacs;

Reported by: Matthew Newton <matt <at> knosis.org>

Date: Tue, 18 Jun 2019 18:20:02 UTC

Severity: minor

Tags: confirmed

Found in versions 27.0.50, 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36283 in the body.
You can then email your comments to 36283 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36283; Package emacs. (Tue, 18 Jun 2019 18:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Newton <matt <at> knosis.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Jun 2019 18:20:02 GMT) Full text and rfc822 format available.

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

From: Matthew Newton <matt <at> knosis.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; hl-line-mode updates the wrong window after
 clone-indirect-buffer
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36283; Package emacs. (Thu, 04 Jul 2019 21:17:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Matthew Newton <matt <at> knosis.org>
Cc: 36283 <at> debbugs.gnu.org
Subject: Re: bug#36283: 27.0.50;
 hl-line-mode updates the wrong window after clone-indirect-buffer
Date: Thu, 04 Jul 2019 17:16:28 -0400
found 36283 24.5
tags 36283 + confirmed
severity 36283 minor
quit

Matthew Newton <matt <at> knosis.org> writes:

> 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. 

I guess hl-line-mode needs to add an entry to clone-indirect-buffer-hook
(and clone-buffer-hook; clone-buffer seems to have the same problem)
to handle copying of hl-line-overlay.





bug Marked as found in versions 24.5. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 04 Jul 2019 21:17:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 04 Jul 2019 21:17:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 04 Jul 2019 21:17:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36283; Package emacs. (Mon, 01 Feb 2021 09:32:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Matthew Newton <matt <at> knosis.org>, 36283 <at> debbugs.gnu.org
Subject: Re: bug#36283: 27.0.50; hl-line-mode updates the wrong window after
 clone-indirect-buffer
Date: Mon, 01 Feb 2021 10:31:42 +0100
Noam Postavsky <npostavs <at> gmail.com> writes:

> Matthew Newton <matt <at> knosis.org> writes:
>
>> 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.
>
> I guess hl-line-mode needs to add an entry to clone-indirect-buffer-hook
> (and clone-buffer-hook; clone-buffer seems to have the same problem)
> to handle copying of hl-line-overlay.

I'm not sure it's a bug, though?  `hl-line-mode' switches on
highlighting in one specific buffer.  An indirect buffer is a new
buffer, and if you want line highlighting there, you should switch it on
there, I think?  Automatically switching on the mode in the indirect
buffer would be surprising, I think.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 36283 <at> debbugs.gnu.org and Matthew Newton <matt <at> knosis.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 01 Feb 2021 09:32:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36283; Package emacs. (Mon, 01 Feb 2021 16:10:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Noam Postavsky <npostavs <at> gmail.com>
Cc: Matthew Newton <matt <at> knosis.org>,
 "36283 <at> debbugs.gnu.org" <36283 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#36283: 27.0.50; hl-line-mode updates the wrong
 window after clone-indirect-buffer
Date: Mon, 1 Feb 2021 16:09:49 +0000
> I'm not sure it's a bug, though?  `hl-line-mode' switches on
> highlighting in one specific buffer.  An indirect buffer is a new
> buffer, and if you want line highlighting there, you should switch it
> on there, I think?  Automatically switching on the mode in the indirect
> buffer would be surprising, I think.

That's the correct answer.  Users should be
able to use indirect buffers as the different
buffers they are.  They can use whatever
minor modes they want in whichever indirect
buffers they want.


bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Mar 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 27 days ago.

Previous Next


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