[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex b858aae 10/35: Make TeX-pdf-tools-sync-view work
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex b858aae 10/35: Make TeX-pdf-tools-sync-view work with region files |
Date: |
Sun, 22 Mar 2015 09:26:59 +0000 |
branch: externals/auctex
commit b858aae89c9b810b6f62627620056b806c07f065
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Make TeX-pdf-tools-sync-view work with region files
* tex.el (TeX-pdf-tools-sync-view): Make it work with
`TeX-command-region'.
---
ChangeLog | 5 +++++
tex.el | 27 ++++++++++++++++-----------
2 files changed, 21 insertions(+), 11 deletions(-)
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)
- [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, 2015/03/22
- [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 <=
- [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
- [elpa] externals/auctex 39badf0 15/35: New defcustom LaTeX-fill-excluded-macros, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 83306b4 13/35: Add some expl3 support, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 074af82 16/35: Add docs for LaTeX-fill-excluded-macros, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 61ed48c 19/35: Replace add-to-list with pushnew, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 31c42ca 23/35: Indent \[...\] display math as a normal environment., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 41c5f9a 24/35: Improve error/warning reporting when file cannot be determined., Tassilo Horn, 2015/03/22