GNU bug report logs - #45946
28.0.50; hl-line-sticky-flag not working

Previous Next

Package: emacs;

Reported by: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>

Date: Mon, 18 Jan 2021 04:29:02 UTC

Severity: normal

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.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 45946 in the body.
You can then email your comments to 45946 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#45946; Package emacs. (Mon, 18 Jan 2021 04:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 Jan 2021 04:29:02 GMT) Full text and rfc822 format available.

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

From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; hl-line-sticky-flag not working
Date: Mon, 18 Jan 2021 01:13:38 -0300
1) emacs -q      # start emacs
2) C-x 3         # split window right
3) C-x <left>    # go to previous buffer (*scratch*)
4) eval the following expression:
     (setq-default hl-line-sticky-flag nil)
5) M-x hl-line-mode    # enable hl-line-mode in current buffer
6) C-x o               # other window (*GNU Emacs*)
7) M-x hl-line-mode    # enable hl-line-mode in current buffer
8) C-x o multiple times to change the selected window

Expected result: the line is highlighted only in selected window
Actual result: sometimes the line in non-selected window is not unhighlighted

---

In GNU Emacs 28.0.50 (build 39, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2021-01-16 built on precision5540
Repository revision: 25e1b732947bcba51e457a7168eba6608fb666c0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.10

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: pt_BR.UTF-8
  value of $LC_MONETARY: pt_BR.UTF-8
  value of $LC_NUMERIC: pt_BR.UTF-8
  value of $LC_TIME: pt_BR.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  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 emacsbug mail-extr cursor-sensor nndraft nnmh utf-7 gnutls
network-stream nsm nnnil gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg nntp gnus-cache smtpmail sendmail misearch
multi-isearch rx org-element avl-tree generator ol-eww eww xdg url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum shr kinsoku svg dom browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse url-vars mailcap gnus-group gnus-undo
gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win
gnus nnheader gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map rfc2047
rfc2045 ietf-drums mail-utils mm-util mail-prsvr wid-edit ol-docview
doc-view image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601
ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color
ring org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice
org-macs org-loaddefs format-spec cal-menu calendar cal-loaddefs vc-git
diff-mode easy-mmode conf-mode dabbrev jka-compr find-func cl-print
time-date subr-x cl-extra shortdoc text-property-search seq byte-opt gv
bytecomp byte-compile cconv hl-line thingatpt help-fns radix-tree
help-mode easymenu cl-loaddefs cl-lib iso-transl 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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 216767 12349)
 (symbols 48 22643 1)
 (strings 32 76291 2945)
 (string-bytes 1 2499291)
 (vectors 16 35895)
 (vector-slots 8 445907 18792)
 (floats 8 315 136)
 (intervals 56 1217 0)
 (buffers 984 24))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45946; Package emacs. (Thu, 21 Jan 2021 01:23:02 GMT) Full text and rfc822 format available.

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

From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Re: bug#45946: 28.0.50; hl-line-sticky-flag not working
Date: Wed, 20 Jan 2021 22:07:33 -0300
[Message part 1 (text/plain, inline)]
Here is a proposal of patch for this bug. It seems to work well in all
cases I have tested, but maybe I am missing some edge case. Suggestions
are welcome.

[0001-Always-set-overlay-current-buffer-on-hl-line-maybe-u.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45946; Package emacs. (Thu, 21 Jan 2021 14:14:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
Cc: 45946 <at> debbugs.gnu.org
Subject: Re: bug#45946: [PATCH] Re: bug#45946: 28.0.50;
 hl-line-sticky-flag not working
Date: Thu, 21 Jan 2021 16:13:52 +0200
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Wed, 20 Jan 2021 22:07:33 -0300
> 
> Here is a proposal of patch for this bug. It seems to work well in all
> cases I have tested, but maybe I am missing some edge case. Suggestions
> are welcome.

Thanks.

While at that, would it be possible to fix some code there that I at
least consider strange?  E.g., it calls delete-overlay, but doesn't
assign nil to the variable, so the overlayp predicate still returns
non-nil for the resulting invalid overlay.  Also, it puts 2 functions
on the post-command-hook, but it looks like the code subtly depends on
the order of their execution (should hl-line-highlight run before or
after hl-line-maybe-unhighlight?).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45946; Package emacs. (Sat, 23 Jan 2021 02:38:01 GMT) Full text and rfc822 format available.

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

From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Re: bug#45946: 28.0.50; hl-line-sticky-flag not working
Date: Fri, 22 Jan 2021 23:22:21 -0300
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
>> Date: Wed, 20 Jan 2021 22:07:33 -0300
>> 
>> Here is a proposal of patch for this bug. It seems to work well in all
>> cases I have tested, but maybe I am missing some edge case. Suggestions
>> are welcome.
>
> Thanks.
>
> While at that, would it be possible to fix some code there that I at
> least consider strange?  E.g., it calls delete-overlay, but doesn't
> assign nil to the variable, so the overlayp predicate still returns
> non-nil for the resulting invalid overlay.  Also, it puts 2 functions
> on the post-command-hook, but it looks like the code subtly depends on
> the order of their execution (should hl-line-highlight run before or
> after hl-line-maybe-unhighlight?).

Hi Eli,

Thanks for your suggestions. Please find attached a new patch that uses
a single post-command-hook function and some other minor changes. The
original issue is fixed.

[0001-Use-single-post-command-hook-on-hl-line.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45946; Package emacs. (Sat, 23 Jan 2021 08:11:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
Cc: 45946 <at> debbugs.gnu.org
Subject: Re: bug#45946: [PATCH] Re: bug#45946: 28.0.50;
 hl-line-sticky-flag not working
Date: Sat, 23 Jan 2021 10:10:47 +0200
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Fri, 22 Jan 2021 23:22:21 -0300
> 
> > While at that, would it be possible to fix some code there that I at
> > least consider strange?  E.g., it calls delete-overlay, but doesn't
> > assign nil to the variable, so the overlayp predicate still returns
> > non-nil for the resulting invalid overlay.  Also, it puts 2 functions
> > on the post-command-hook, but it looks like the code subtly depends on
> > the order of their execution (should hl-line-highlight run before or
> > after hl-line-maybe-unhighlight?).
> 
> Hi Eli,
> 
> Thanks for your suggestions. Please find attached a new patch that uses
> a single post-command-hook function and some other minor changes. The
> original issue is fixed.

Thanks, this LGTM, but could you please accompany the changes with the
ChangeLog-style commit log message (see CONTRIBUTE about the details)?

Also, this patch is close to the limit that we can accept without
copyright assignment.  So I'd suggest that you start the legal
paperwork rolling at this time, to allow us to accept your future
contributions.  Would you like me to send to you the legal form to
fill?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45946; Package emacs. (Sat, 23 Jan 2021 19:12:01 GMT) Full text and rfc822 format available.

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

From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#45946: [PATCH] Re: bug#45946: 28.0.50; hl-line-sticky-flag
 not working
Date: Sat, 23 Jan 2021 16:11:04 -0300
[Message part 1 (text/plain, inline)]
>
> Thanks, this LGTM, but could you please accompany the changes with the
> ChangeLog-style commit log message (see CONTRIBUTE about the details)?
>
> Also, this patch is close to the limit that we can accept without
> copyright assignment.  So I'd suggest that you start the legal
> paperwork rolling at this time, to allow us to accept your future
> contributions.  Would you like me to send to you the legal form to
> fill?

Patch updated with appropriate ChangeLog-style commit log message.
I have already concluded the assignment process with FSF.

[0001-Use-single-post-command-hook-on-hl-line-modes.patch (text/x-diff, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 23 Jan 2021 19:38:01 GMT) Full text and rfc822 format available.

Notification sent to Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>:
bug acknowledged by developer. (Sat, 23 Jan 2021 19:38:02 GMT) Full text and rfc822 format available.

Message #25 received at 45946-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
Cc: 45946-done <at> debbugs.gnu.org
Subject: Re: bug#45946: [PATCH] Re: bug#45946: 28.0.50;
 hl-line-sticky-flag not working
Date: Sat, 23 Jan 2021 21:37:28 +0200
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Sat, 23 Jan 2021 16:11:04 -0300
> 
> Patch updated with appropriate ChangeLog-style commit log message.

Thanks, pushed (after minor tweaking of the log message).

> I have already concluded the assignment process with FSF.

Right, the records were updated today.




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

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

Previous Next


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