display-line-numbers-mode reactivated in pdf-view-mode when previewing (consult-buffer) #853
-
Hi, When previewing files with
After having checked the documentation of Have I missed something? Is there another way to tell Thank you for the amazing work! Emacs 29.1 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
As an alternative you could enable display-line-numbers mode per mode (text-mode/prog-mode/conf-mode), then the issue should not occur. |
Beta Was this translation helpful? Give feedback.
-
For users facing the same "issue", as previously suggested something like
solves the problem. However, such workaround leads |
Beta Was this translation helpful? Give feedback.
-
@minad good idea, I've looked further into it. At the minor price of redefining a function of (require 'display-line-numbers)
(defun display-line-numbers--turn-on ()
"Turn on `display-line-numbers-mode'."
(unless (or (minibufferp) (eq major-mode 'pdf-view-mode))
(display-line-numbers-mode))) Now one can simply set |
Beta Was this translation helpful? Give feedback.
@minad good idea, I've looked further into it. At the minor price of redefining a function of
display-line-numbers.el
used in the definition of the globalized minor mode , the following completely solves the 'issue':Now one can simply set
(global-display-line-numbers-mode 1)
and the original issue is solved while still having line numbers in the preview of non-PDF files.