I've installed pdf-tools through MELPA, and it works like a charm. Funnily, and as is documented in the readme, the command pdf-tools-install
needs to be run each time if you want pdf-tools to be enabled; (require 'pdf-tools)
is not enough (the use of the word "install" in the command name is a little bit misleading). The only thing is, it takes 12 seconds or so to run pdf-tools-install
from my init.el file (clocked using esup
).
So what I've done is the following:
(with-eval-after-load 'tex
(pdf-tools-install)
(setq TeX-view-program-selection '((output-pdf "pdf-tools")))
(setq TeX-view-program-list '(("pdf-tools" "TeX-pdf-tools-sync-view"))))
which allows it to only load when I'm in tex mode, which is nice. But it still means it takes an extra 12 seconds to load any tex file I want to work on, if I haven't loaded it in my current emacs session.
Call me impatient, but I literally moved to emacs from a more bloated editor in order to reduce startup times!! Is there any reason anyone can think of why it's taking so long to load pdf-tools-install
, and a solution? Thanks in advance!
EDIT: Because of discussions following this issue, I replaced pdf-tools-install
with (require 'pdf-tools)
in my init.el just to make sure that pdf-tools-install is indeed required, and it seems that it is. Using (require 'pdf-tools)
does not properly initiate pdf-tools, and pdfs are displayed using the normal DocView mode, rather than pdf-tools' PDFView mode.
pdf-tools-install
once and then put(require 'pdf-tools)
in your init file.(require 'pdf-tools)
, startup time is still about 12 seconds, and fails to work; auctex reverts to docview.