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


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. b858aae89c9b810b6f62627620056b806c07f065
Date: Mon, 09 Feb 2015 09:16:27 +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  b858aae89c9b810b6f62627620056b806c07f065 (commit)
      from  adf90e91425908e714131c3907db4ed7cda803d0 (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 b858aae89c9b810b6f62627620056b806c07f065
Author: Tassilo Horn <address@hidden>
Date:   Mon Feb 9 10:15:52 2015 +0100

    Make TeX-pdf-tools-sync-view work with region files
    
    * tex.el (TeX-pdf-tools-sync-view): Make it work with
    `TeX-command-region'.

diff --git a/ChangeLog b/ChangeLog
index f5f9afa..6b88e3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-09  Tassilo Horn  <address@hidden>
 
+       * tex.el (TeX-pdf-tools-sync-view): Make it work with
+       `TeX-command-region'.
+
+2015-02-09  Tassilo Horn  <address@hidden>
+
        * tex.el (TeX-pdf-tools-sync-view): Simplify function.
 
 2015-02-09  Arash Esbati  <address@hidden>
diff --git a/tex.el b/tex.el
index 44ddb9f..05d1b4d 100644
--- a/tex.el
+++ b/tex.el
@@ -1097,18 +1097,23 @@ search are checked, too."
                                           spec))))))))
 
 (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'."
+  "Focus the focused page/paragraph in `pdf-view-mode'.
+If `TeX-source-correlate-mode' is disabled, only find and pop to
+the output PDF file.  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)))
-        (buf (or (find-buffer-visiting doc)
-                 (find-file-noselect doc))))
-    (if (and TeX-source-correlate-mode
-            (fboundp 'pdf-sync-forward-search))
-       (pdf-sync-forward-search)
-      (pop-to-buffer buf))))
+    (error "PDF Tools are not installed"))
+  (unless TeX-PDF-mode
+    (error "PDF Tools only work with PDF output"))
+  (if (and TeX-source-correlate-mode
+          (fboundp 'pdf-sync-forward-search))
+      (with-current-buffer (or (find-buffer-visiting
+                               (concat file "." TeX-default-extension))
+                              (current-buffer))
+       (pdf-sync-forward-search))
+    (let ((pdf (concat file "." (TeX-output-extension))))
+      (pop-to-buffer (or (find-buffer-visiting pdf)
+                        (find-file-noselect pdf))))))
 
 (defvar url-unreserved-chars)
 

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

Summary of changes:
 ChangeLog |    5 +++++
 tex.el    |   27 ++++++++++++++++-----------
 2 files changed, 21 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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