evil-collection
evil-collection copied to clipboard
Evil Collection triggers loading of `pdf-tools` twice
I noticed a small bug when using pdf-tools
in combination with evil-collection
.
Using the following code in my init file (with pdf-tools
already installed):
(use-package evil-collection
:after evil
:config
(evil-collection-init))
(pdf-loader-install)
(with-eval-after-load 'pdf-view
(message "LOADED pdf-view!"))
(with-eval-after-load 'pdf-tools
(message "LOADED pdf-tools!")
;; (debug)
)
I can see in the message buffer, that the pdf-tools
code is loaded twice:
LOADED pdf-tools!
LOADED pdf-view!
LOADED pdf-tools!
Using the debugger I figured out that the first (unintended) load happens when loading pdf-view
and seems to be caused by evil-collection-require
:
Here is also the debugger of the second (intended) load:
Removing the evil-collection
code from my init file fixes this bug and the pdf-tools
code is only loaded once, after pdf-view
:
LOADED pdf-view!
LOADED pdf-tools!