From mboxrd@z Thu Jan 1 00:00:00 1970 From: "briangpowell ." Subject: Re: PDF-tools... and LaTeX Date: Mon, 16 Nov 2015 21:17:47 -0500 Message-ID: References: <3135430.GIe9WkF5XZ@linux-k2bd.site> <87r3jp9ykj.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd6b5eabd80370524b3213c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyVq9-0002aX-Sq for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 21:17:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyVq8-0004lq-9Z for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 21:17:49 -0500 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:32792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyVq8-0004lj-3E for emacs-orgmode@gnu.org; Mon, 16 Nov 2015 21:17:48 -0500 Received: by obbww6 with SMTP id ww6so136867004obb.0 for ; Mon, 16 Nov 2015 18:17:47 -0800 (PST) In-Reply-To: <87r3jp9ykj.fsf@alphaville.usersys.redhat.com> 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: Nick Dokos Cc: emacs-orgmode --047d7bd6b5eabd80370524b3213c Content-Type: text/plain; charset=UTF-8 Wow, as usual thanks Nick, great help and insights. Say, LaTeX and xpdf and poppler and Okular are all great software--suggest you try out xournal too: apt-get install xournal --shows .pdfs and many tools for editing .pdf's Also, you're well aware of the Emacs/ELisp tools for .pdf's ( https://github.com/politza/pdf-tools); but, suggest you install and tinker with CPAN/Perl's pdf-tools--well worth investigating. On Mon, Nov 16, 2015 at 8:58 PM, Nick Dokos wrote: > AW writes: > > > 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. > > > > So when-let is not defined above, and it is not defined by emacs, so you > got to get the definition from somewhere. Go back to the link and you'll > see further down that the OP complains about the same thing. The > solution seems to be > > (require 'subr-x) > > > 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. > > > > That's because libpoppler is essentially a library version of xpdf: > > $ yum info poppler > Loaded plugins: auto-update-debuginfo, copr, etckeeper, langpacks > Installed Packages > Name : poppler > Arch : x86_64 > Version : 0.26.2 > Release : 9.fc21 > Size : 2.6 M > Repo : installed > Summary : PDF rendering library > URL : http://poppler.freedesktop.org/ > License : (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT > Description : Poppler, a PDF rendering library, is a fork of the xpdf PDF > : viewer developed by Derek Noonburg of Glyph and Cog, LLC. > > -- > Nick > > > > > --047d7bd6b5eabd80370524b3213c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Wow, as usual thanks Nick, great help and insights.
Say, LaTeX and xpdf and poppler and Okular are all great softw= are--suggest you try out xournal too:

apt-get inst= all xournal

--shows .pdfs and many tools for editi= ng .pdf's

Also, you're well aware of the E= macs/ELisp tools for .pdf's=C2=A0(https://github.com/politza/pdf-tools); but, suggest you ins= tall and tinker with CPAN/Perl's pdf-tools--well worth investigating.

On Mon,= Nov 16, 2015 at 8:58 PM, Nick Dokos <ndokos@gmail.com> wrote= :
AW <alexander.willand@= t-online.de> writes:

> Dear all,
>
> I dare to ask this slightly off-topic question, because of the discuss= ion
> 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 (Em= acs, AUCTeX)
> as well.
>
> The trouble is the automagic reloading of the PDF every time it get= 9;s changed
> on disk. Okular does this, but pdf-tools need some kind of invitation?= !
>
> From here https://github.com/politza/pdf-tools/i= ssues/128
> is this setup for .emacs:
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 8< =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
>
>
> (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
>=C2=A0 #'th/pdf-view-revert-buffer-maybe)
>
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >8 =3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
>
> If I compile a *.tex file again, I get the error
>
> "error in process sentinel: Symbol's function definition is v= oid: when-let"
>
> ...and the PDF won't get updated.
>

So when-let is not defined above, and it is not defined by emac= s, so you
got to get the definition from somewhere. Go back to the link and you'l= l
see further down that the OP complains about the same thing. The
solution seems to be

=C2=A0 =C2=A0(require 'subr-x)

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

That's because libpoppler is essentially a library version of xp= df:

$ yum info poppler
Loaded plugins: auto-update-debuginfo, copr, etckeeper, langpacks
Installed Packages
Name=C2=A0 =C2=A0 =C2=A0 =C2=A0 : poppler
Arch=C2=A0 =C2=A0 =C2=A0 =C2=A0 : x86_64
Version=C2=A0 =C2=A0 =C2=A0: 0.26.2
Release=C2=A0 =C2=A0 =C2=A0: 9.fc21
Size=C2=A0 =C2=A0 =C2=A0 =C2=A0 : 2.6 M
Repo=C2=A0 =C2=A0 =C2=A0 =C2=A0 : installed
Summary=C2=A0 =C2=A0 =C2=A0: PDF rendering library
URL=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: http://poppler.freedesktop.org= /
License=C2=A0 =C2=A0 =C2=A0: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MI= T
Description : Poppler, a PDF rendering library, is a fork of the xpdf PDF =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : viewer developed by Derek Noonb= urg of Glyph and Cog, LLC.

--
Nick





--047d7bd6b5eabd80370524b3213c--