auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 5276f35d9dc7b37cfb088


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 5276f35d9dc7b37cfb0881ddcaf11c05783aac15
Date: Thu, 05 Feb 2015 08:51:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  5276f35d9dc7b37cfb0881ddcaf11c05783aac15 (commit)
      from  061d8cdb9ac0e154783ac722be5921ae2beb37f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5276f35d9dc7b37cfb0881ddcaf11c05783aac15
Author: Tassilo Horn <address@hidden>
Date:   Thu Feb 5 09:51:11 2015 +0100

    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'.

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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    7 +++++++
 tex.el    |   17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]