From 2271fa3d17092356da52e9ce59a9ecb80950abdf Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Sat, 4 Nov 2017 21:43:54 +0100 Subject: Set local values of outline-regexp and outline-level --- lisp/pdf-outline.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/pdf-outline.el b/lisp/pdf-outline.el index 077c0fb..e141ca8 100644 --- a/lisp/pdf-outline.el +++ b/lisp/pdf-outline.el @@ -166,10 +166,10 @@ additionally quit the Outline. rebound to their respective last character. \\{pdf-outline-buffer-mode-map}" - (setq outline-regexp "\\( *\\)." - outline-level - (lambda nil (1+ (/ (length (match-string 1)) - pdf-outline-buffer-indent)))) + (setq-local outline-regexp "\\( *\\).") + (setq-local outline-level + (lambda nil (1+ (/ (length (match-string 1)) + pdf-outline-buffer-indent)))) (toggle-truncate-lines 1) (setq buffer-read-only t) -- cgit v1.0 From 962b993f8b664cdb7e27f93daf690d4e9493f70b Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Sun, 12 Nov 2017 17:35:37 +0100 Subject: Add a FIXME for a potential problem --- lisp/pdf-cache.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/pdf-cache.el b/lisp/pdf-cache.el index 84b9740..49b86d7 100644 --- a/lisp/pdf-cache.el +++ b/lisp/pdf-cache.el @@ -349,6 +349,8 @@ See also `pdf-info-renderpage-highlight' and (pdf-cache-prefetch-minor-mode (pdf-util-assert-pdf-buffer) (add-hook 'pre-command-hook 'pdf-cache--prefetch-stop nil t) + ;; FIXME: Disable the time when the buffer is killed or it's + ;; major-mode changes. (setq pdf-cache--prefetch-timer (run-with-idle-timer (or pdf-cache-prefetch-delay 1) t 'pdf-cache--prefetch-start (current-buffer)))) -- cgit v1.0 From 10960babfa98b1f383d39072b3a25a91cbef83b4 Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Sun, 25 Mar 2018 13:06:42 -0300 Subject: Include instructions for installing the FreeBSD package --- README.org | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 16c1461..2765b20 100644 --- a/README.org +++ b/README.org @@ -130,9 +130,18 @@ or likewise within Emacs using `setenv`. After that, compilation should proceed as normal. -**** Compiling on FreeBSD - Although not officially suppported, it has been reported that - pdf-tools work well on FreeBSD. Install the dependencies with +**** FreeBSD + Although not officially supported, it has been reported that + pdf-tools work well on FreeBSD. Instead of building pdf-tools, you + can install one of the OS packages with, e.g. +#+BEGIN_SRC sh + $ pkg install pdf-tools-emacs25 +#+END_SRC + To see the current list of pdf-tools packages for FreeBSD visit + [[https://repology.org/metapackages/?search=pdf-tools&inrepo=freebsd][the Repology list]]. + + To build pdf-tools from either melpa or directly from the source + repository, install the dependencies with #+BEGIN_SRC sh $ pkg install autotools gmake poppler-glib #+END_SRC -- cgit v1.0 From 73ead2b71368fdacc4a1209b5af252a3ea604fac Mon Sep 17 00:00:00 2001 From: Roger Iyengar Date: Fri, 2 Mar 2018 01:57:50 -0500 Subject: Fixed Path Issue on Windows and updated readme Changed install to always prompt Windows users for MSYS2 location. This allows users who have their cygwin bin directory in their path variable to install pdf-tools properly --- README.org | 42 ++++++++++++++++-------------------------- lisp/pdf-tools.el | 6 +++--- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/README.org b/README.org index 2765b20..3c983d4 100644 --- a/README.org +++ b/README.org @@ -165,20 +165,10 @@ emacs. This includes the standard binaries provided by the GNU project, those available as MSYS2 packages and numerous third-party binaries. It has been tested with emacs 25.1. Instructions are - provided under [[Compilation and installation on Windows]], below. -**** Compiling on Cygwin - On [[https://www.cygwin.com/][Cygwin]] the following dependencies are needed. - - - libpoppler-devel (*Lib* category) - - libpoppler-glib-devel (*Lib* category) - - libpng-devel (*Devel* category) - - make (*Devel* category) - - gcc-core (*Devel* category) - - gcc-g++ (*Devel* category) - - autoconf (*Devel* category) - - automake (*Devel* category) - - perl (*Perl* category) - - emacs-w32 (*Editors* category) + provided under [[#compilation-and-installation-on-windows][Compilation and installation on Windows]], below. + PDF Tools will successfully compile using Cygwin, but it will not be + able to open PDFs properly due to the way binaries compiled with Cygwin + handle file paths. *** Compilation :PROPERTIES: @@ -213,28 +203,28 @@ 2. Update and install dependencies, skipping any you already have #+BEGIN_SRC sh - pacman -Syu - pacman -S base-devel - pacman -S mingw-w64-x86_64-toolchain - pacman -S mingw-w64-x86_64-zlib - pacman -S mingw-w64-x86_64-libpng - pacman -S mingw-w64-x86_64-poppler - pacman -S mingw-w64-x86_64-imagemagick + $ pacman -Syu + $ pacman -S base-devel + $ pacman -S mingw-w64-x86_64-toolchain + $ pacman -S mingw-w64-x86_64-zlib + $ pacman -S mingw-w64-x86_64-libpng + $ pacman -S mingw-w64-x86_64-poppler + $ pacman -S mingw-w64-x86_64-imagemagick #+END_SRC 3. Install PDF tools in Emacs, but do not try to compile the server. Instead, get a separate copy of the source somewhere else. #+BEGIN_SRC sh - git clone https://github.com/politza/pdf-tools + $ git clone https://github.com/politza/pdf-tools #+END_SRC - 4. Open mingw64 shell + 4. Open mingw64 shell (*Note:* You must use mingw64.exe and not msys2.exe) 5. Compile pdf-tools #+BEGIN_SRC sh - cd pdf-tools/build - make -s + $ cd /path/to/pdf-tools + $ make -s #+END_SRC 6. This should produce a file ~server/epdfinfo.exe~. Copy this file @@ -259,7 +249,7 @@ #+BEGIN_SRC emacs-lisp (setenv "PATH" (concat "C:\\msys64\\mingw64\\bin;" (getenv "PATH"))) - #+END_SRC + #+END_SRC *** ELisp Prerequisites This package depends on the following Elisp packages, which should diff --git a/lisp/pdf-tools.el b/lisp/pdf-tools.el index 7731eeb..bc2d069 100644 --- a/lisp/pdf-tools.el +++ b/lisp/pdf-tools.el @@ -263,11 +263,11 @@ Returns always nil, unless `system-type' equals windows-nt." (defun pdf-tools-find-bourne-shell () "Locate a usable sh." - (or (executable-find "sh") - (and (eq system-type 'windows-nt) + (or (and (eq system-type 'windows-nt) (let* ((directory (pdf-tools-msys2-directory))) (when directory - (expand-file-name "usr/bin/bash.exe" directory)))))) + (expand-file-name "usr/bin/bash.exe" directory)))) + (executable-find "sh"))) (defun pdf-tools-build-server (target-directory &optional -- cgit v1.0