I want to use pdf-tools to read my pdf with emacs. I am on Emacs 27.1 with spacemacs 0.300.x. I have pdf-tools as a package in my .spacemac file and also require

   '((output-dvi "open")
     (output-pdf "PDF Tools")
     (output-html "open")))

However compiling a file with auctex I have Docview that is opening instead of pdf-tools.

pdf-looks looked installed, reinstalling it does not fix the problem.

Using describe-variable I get the following:

   '((output-dvi "open")
     (output-pdf "PDF Tools")
     (output-html "open"))) 

TeX-view-program-list is nil

TeX-view-program-list-builtin is a variable defined in ‘tex.el’.
Its value is
(("Preview.app" "open -a Preview.app %o" "open")
 ("Skim" "open -a Skim.app %o" "open")
 ("PDF Tools" TeX-pdf-tools-sync-view)
 ("displayline" "displayline %n %o %b" "displayline")
 ("open" "open %o" "open"))

I have red How to use pdf-tools (pdf-view-mode) in emacs? and it is not helping here.

Note that opening a pdf file directly opens it with DocView.

  • If opening a pdf directly gets you docview mode, the problem is with your pdftools installation, not auctex. What OS are you on? Windows, Mac, Linux?
    – Tyler
    Dec 16, 2020 at 17:13
  • MacOs. I did the build and it succeded. Now i just rebooted my computer and did it again. I check M-x pdf-info-check-epdfinfo RETas suggested on the github page of pdf-tool and it looked okay. I can now open pdf with pdf-tools ... weird, i don't know what i did different than last time. Dec 16, 2020 at 17:23
  • 1
    i find the build process can be temperamental. Sometimes it takes a few tries, even if they all were "successful". Does Auctex work now?
    – Tyler
    Dec 16, 2020 at 17:40
  • Yes perfectly, thanks. But the previous build finished without errror and even told me that the build was succesful. However thinking about it, the first time i got messages (like a build from the shell) with warnings and so. Second time I got nothing, like of it was instantaneous. Dec 16, 2020 at 17:52


Your Answer

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

Browse other questions tagged or ask your own question.