`(set-evil-initial-state! 'pdf-view-mode 'emacs)` not obeyed?

What happened?

Evil mode interferes with interactions with PDFs in pdf-view-mode - see issue here

I am unable to set emacs as the initial state in pdf-view using (set-evil-initial-state! 'pdf-view-mode 'emacs) and have to call C-z to exit evil state every time I open a pdf.

What did you expect to happen?

Setting (set-evil-initial-state! 'pdf-view-mode 'emacs) sets emacs as initial state in pdf-view-mode.

Steps to reproduce

  1. set (set-evil-initial-state! 'pdf-view-mode 'emacs)
  2. open pdf
  3. evil is initial state.

System information


Loading data dump...

As these packages are all lazy-loaded, did you defer your configuration until evil-collection-pdf was loaded? E.g.

(after! evil-collection-pdf
  (set-evil-initial-state! 'pdf-view-mode 'emacs))

If that doesn’t work, try replacing evil-collection-pdf with pdf-view or pdf-tools.

1 Like

Thanks for the very fast response! deferring with pdf-tools worked!

(after! pdf-tools
  (set-evil-initial-state! 'pdf-view-mode 'emacs))

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.