From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: PDF-tools... and LaTeX Date: Mon, 16 Nov 2015 21:17:38 +0100 Message-ID: <3135430.GIe9WkF5XZ@linux-k2bd.site> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyQE0-0000ze-To for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 15:18:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyQDw-0005Ws-Tk for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 15:18:04 -0500 Received: from mailout01.t-online.de ([194.25.134.80]:47464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyQDw-0005W1-Nf for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 15:18:00 -0500 Received: from fwd37.aul.t-online.de (fwd37.aul.t-online.de [172.20.27.137]) by mailout01.t-online.de (Postfix) with SMTP id 36E12309726 for ; Mon, 16 Nov 2015 21:17:58 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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