Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evil Collection triggers loading of pdf-tools twice #752

Open
SPFabGerman opened this issue Sep 3, 2023 · 0 comments
Open

Evil Collection triggers loading of pdf-tools twice #752

SPFabGerman opened this issue Sep 3, 2023 · 0 comments

Comments

@SPFabGerman
Copy link

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:
Screenshot-2023-09-03-20:29:03

Here is also the debugger of the second (intended) load:
Screenshot-2023-09-03-20:29:24

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant