[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 5276f35 03/35: Add PDF Tools support
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 5276f35 03/35: Add PDF Tools support |
Date: |
Sun, 22 Mar 2015 09:26:55 +0000 |
branch: externals/auctex
commit 5276f35d9dc7b37cfb0881ddcaf11c05783aac15
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Add PDF Tools support
* tex.el (TeX-pdf-tools-sync-view): New function to use PDF Tools
`pdf-view-mode' as a viewer.
(TeX-view-program-list-builtin): Add PDF Tools entry calling
`TeX-pdf-tools-sync-view'.
---
ChangeLog | 7 +++++++
tex.el | 17 ++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 169f5d3..cc381f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-05 Tassilo Horn <address@hidden>
+
+ * tex.el (TeX-pdf-tools-sync-view): New function to use PDF Tools
+ `pdf-view-mode' as a viewer.
+ (TeX-view-program-list-builtin): Add PDF Tools entry calling
+ `TeX-pdf-tools-sync-view'.
+
2015-02-04 Tassilo Horn <address@hidden>
* Makefile.in (STYLESRC): Add new style.
diff --git a/tex.el b/tex.el
index a17b8b4..3aace79 100644
--- a/tex.el
+++ b/tex.el
@@ -1098,6 +1098,20 @@ search are checked, too."
(defvar url-unreserved-chars)
+(defun TeX-pdf-tools-sync-view ()
+ "Focus the focused page/paragraph in `pdf-view-mode'. Used by
+default for the PDF Tools viewer entry in
+`TeX-view-program-list-builtin'."
+ (unless (featurep 'pdf-tools)
+ (error "PDF Tools are not installed!"))
+ (let ((doc (concat file "." (TeX-output-extension))))
+ (unless (get-file-buffer doc)
+ (find-file-noselect doc))
+ (if (and TeX-source-correlate-mode
+ (fboundp 'pdf-sync-display-pdf))
+ (pdf-sync-display-pdf)
+ (pop-to-buffer doc))))
+
(defun TeX-evince-sync-view ()
"Focus the focused page/paragraph in Evince with the position
of point in emacs by using Evince's DBUS API. Used by default
@@ -1164,7 +1178,8 @@ the requirements are met."
" -i %(outpage)"
" -p %(outpage)")) " %o")) "evince")
("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a"))
"okular")
- ("xdg-open" "xdg-open %o" "xdg-open"))))
+ ("xdg-open" "xdg-open %o" "xdg-open")
+ ("PDF Tools" TeX-pdf-tools-sync-view))))
"Alist of built-in viewer specifications.
This variable should not be changed by the user who can use
`TeX-view-program-list' to add new viewers or overwrite the
- [elpa] externals/auctex updated (8c89edf -> 6620d8c), Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 4b2587d 01/35: Add new style currvita.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 061d8cd 02/35: New tcolorbox style, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 5276f35 03/35: Add PDF Tools support,
Tassilo Horn <=
- [elpa] externals/auctex cc9c060 05/35: Fix compatibility with Emacs < 24., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex cef38f9 04/35: Handle TeX-region in backward search with both PDF Tools and Evince, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 51e3aa8 06/35: Adapt to PDF Tool changes, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 1bc721b 07/35: Fix error introduced in previous commit, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex adf90e9 09/35: Simplify TeX-pdf-tools-sync-view, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b858aae 10/35: Make TeX-pdf-tools-sync-view work with region files, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b2957c8 11/35: Fix bug in pdf-tools support, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 86f4a1e 12/35: Add a hook that's run after an environment is modified, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 566426b 08/35: New style for color.sty, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 3cf92fc 14/35: Fix font-locking issue, Tassilo Horn, 2015/03/22