emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* PDF-tools... and LaTeX
@ 2015-11-16 20:17 AW
  2015-11-17  1:58 ` Nick Dokos
  2015-11-17  9:26 ` PDF-tools... and LaTeX (solved) AW
  0 siblings, 2 replies; 5+ messages in thread
From: AW @ 2015-11-16 20:17 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Dear all,

I dare to ask this slightly off-topic question, because of the discussion 
about pdf-tools a day ago. 

I installed pdf-tools (https://github.com/politza/pdf-tools). It is a _lot_ 
faster than doc-view. Many thanks to Matt Price 
(http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/) I got 
it working with orgmode. 

But I'd like to use it to display my PDFs I produce with LaTeX (Emacs, AUCTeX) 
as well.

The trouble is the automagic reloading of the PDF every time it get's changed 
on disk. Okular does this, but pdf-tools need some kind of invitation?!

From here https://github.com/politza/pdf-tools/issues/128  
is this setup for .emacs:

============= 8< ==============


(pdf-tools-install) 
(load "pdf-tools")
(setq TeX-view-program-selection '((output-dvi "Okular") 
(output-pdf "PDF Tools") ;; 
))

(require 'subr-x)
(defun th/pdf-view-revert-buffer-maybe (file)
(when-let ((buf (find-buffer-visiting file)))
(with-current-buffer buf
(when (derived-mode-p 'pdf-view-mode)
(pdf-view-revert-buffer nil t)))))

(add-hook 'TeX-after-TeX-LaTeX-command-finished-hook
 #'th/pdf-view-revert-buffer-maybe)


================ >8 ============

If I compile a *.tex file again, I get the error 

"error in process sentinel: Symbol's function definition is void: when-let"

...and the PDF won't get updated.

Can anybody help me to get a working setup? Really, this libpoppler behind 
pdf-tools is such a lot faster, it reminds me on xpdf.

I'm on Linux, Emacs 24.5.1 and AUCTeX 11.89.

Thanks!

Alexander

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-17  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 20:17 PDF-tools... and LaTeX AW
2015-11-17  1:58 ` Nick Dokos
2015-11-17  2:17   ` briangpowell .
2015-11-17  8:17   ` AW
2015-11-17  9:26 ` PDF-tools... and LaTeX (solved) AW

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).