0

I'm using GNU/Guix as my operating system and have had pdf-tools installed for several years. During that time whenever I opened a PDF file (e.g. by clicking on an org-mode link or selecting one with find-files). Lately it has stopped automatically associating itself with PDF files. Instead I get an low resolution Docview-mode buffer instead and I have to manually change it to pdf-tools, which otherwise works once it's turned on. I'm guessing something changed upstream which prevents it from working like it did before. I'm wondering whether there is some elisp I can add to my configuration to force the issue so I don't have to manually change the mode and enable the special isearch minor mode manually?

1
  • I found an older question which suggested there was an org-pdfview package, but I did not see it the Guix repositories. Considering how Guix users feel about Emacs and how many of them are academics, surely I must be missing something.
    – wdkrnls
    Commented Aug 11, 2022 at 0:54

1 Answer 1

1

Look for an entry like this in your auto-mode-alist:

...
("\\.[pP][dD][fF]\\'" . pdf-view-mode)
...

If you don't find it, then add something like this to your init file:

(add-to-list 'auto-mode-alist '("\\.[pP][dD][fF]\\'" . pdf-view-mode))

This will add it to the front of the list, so even if there is another entry later on associating PDF files with doc-view-mode-maybe, the pdf-view-mode entry will win.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.