2

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

 '(TeX-view-program-selection
   '((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:

 '(TeX-view-program-selection
   '((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.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • 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 '20 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 RET```as 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. – InfiniteLooper Dec 16 '20 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 '20 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. – InfiniteLooper Dec 16 '20 at 17:52

0 Answers0