What happened?
In my config :
- I active globally line-number display
- I don't highlight the current line globally (but some packages, for example
elfeed or treemacs, highlight the current line in their buffer)
At the beginning of a session, the background of the current line number is the same as the background of the whole buffer. But after using elfeed or treemacs (or manually highlight the current line in one buffer), the current line number background is highlight everywhere : not only in elfeed or treemacs buffer but in every buffer (already opened or newly open).
The problem only happened with doom-themes (but is not limited to a specific doom theme).
What did you expect to happen?
The same highlight from the beginning to the end of an Emacs session.
Steps to reproduce
I tried to make a minimal init.el to reproduce the problem (using doom-nova theme for the contrast but another doom theme can be use) :
;; Initialize package sources
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
;; Display line number
(global-display-line-numbers-mode)
;; Load theme
(use-package doom-themes
:config
(load-theme 'doom-nova t))
;; Install elfeed
(use-package elfeed)
- Launch Emacs with this init file, open a file and look at current line number

M-x elfeed then close elfeed buffer
- Look at the background of the same line number than step 1

Possible solution
I tried to understand the root of the problem and saw that the line-number-current-line face inherits from hl-line without loading it.
So I add (require 'hl-line) before loading theme in my init file. And now the highlight of current line number is the same from the beginning to the end of an Emacs session. But I'm sure if it's the right solution. And I prefer a solution for everyone and not just for me. So I open this issue.
System Information
- Emacs version: 27.2 or 28.0.50 (with native-comp)
- Emacs distro: None
- Operating system: Debian
- Installed commit of doom-themes: b2c0ea0
What happened?
In my config :
elfeedortreemacs, highlight the current line in their buffer)At the beginning of a session, the background of the current line number is the same as the background of the whole buffer. But after using
elfeedortreemacs(or manually highlight the current line in one buffer), the current line number background is highlight everywhere : not only in elfeed or treemacs buffer but in every buffer (already opened or newly open).The problem only happened with doom-themes (but is not limited to a specific doom theme).
What did you expect to happen?
The same highlight from the beginning to the end of an Emacs session.
Steps to reproduce
I tried to make a minimal
init.elto reproduce the problem (using doom-nova theme for the contrast but another doom theme can be use) :M-x elfeedthen close elfeed bufferPossible solution
I tried to understand the root of the problem and saw that the
line-number-current-lineface inherits fromhl-linewithout loading it.So I add
(require 'hl-line)before loading theme in my init file. And now the highlight of current line number is the same from the beginning to the end of an Emacs session. But I'm sure if it's the right solution. And I prefer a solution for everyone and not just for me. So I open this issue.System Information