[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a2a4777fbc2cec4c5ef7d
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a2a4777fbc2cec4c5ef7da74e17bf75b1dae4840 |
Date: |
Tue, 10 Mar 2015 09:14:48 +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 a2a4777fbc2cec4c5ef7da74e17bf75b1dae4840 (commit)
from 41c5f9a1d16d3f9bca0de17b7e8fabdc14481684 (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 a2a4777fbc2cec4c5ef7da74e17bf75b1dae4840
Author: Tassilo Horn <address@hidden>
Date: Tue Mar 10 10:14:01 2015 +0100
Add TeX-after-TeX-LaTeX-command-finished-hook
* doc/auctex.texi (Modes and Hooks): Document
TeX-after-TeX-LaTeX-command-finished-hook.
* tex-buf.el (TeX-after-TeX-LaTeX-command-finished-hook): New
hook.
(TeX-LaTeX-sentinel): Call it.
diff --git a/ChangeLog b/ChangeLog
index 826ca12..704ad0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-03-10 Tassilo Horn <address@hidden>
+
+ * doc/auctex.texi (Modes and Hooks): Document
+ TeX-after-TeX-LaTeX-command-finished-hook.
+
+ * tex-buf.el (TeX-after-TeX-LaTeX-command-finished-hook): New
+ hook.
+ (TeX-LaTeX-sentinel): Call it.
+
2015-03-09 Mosè Giordano <address@hidden>
* tex-buf.el (TeX-find-display-help): Display the help also when
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 3f4ba91..6fb6d71 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3488,6 +3488,20 @@ if it is relevant for any @AUCTeX{} mode, add it to
@code{TeX-mode-hook}
and if it is relevant for all text modes, append it to
@code{text-mode-hook}.
+Other useful hooks are listed below.
+
address@hidden Variable TeX-after-TeX-LaTeX-command-finished-hook
+Hook which is run after the @TeX{}/@LaTeX{} processor has successfully
+finished compiling your document. (@xref{Processing}, for finding out
+how to compile your document). Each function in the hook is run with
+the compiled output document as its argument.
+
+This is useful for automatically refreshing the viewer after
+re-compilation especially when using Emacs viewers such as DocView or
+PDF Tools.
address@hidden defvr
address@hidden TeX-after-TeX-LaTeX-command-finished-hook
+
@node Multifile
@section Multifile Documents
@cindex Multifile Documents
diff --git a/tex-buf.el b/tex-buf.el
index 1385f48..c61ffaf 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -557,8 +557,8 @@ QUEUE is non-nil when we are checking for the printer
queue."
(if (listp TeX-output-extension)
(car TeX-output-extension)
(or (TeX-process-get-variable (TeX-active-master)
- 'TeX-output-extension
- TeX-output-extension)
+ 'TeX-output-extension
+ TeX-output-extension)
TeX-output-extension)))
(defun TeX-view-mouse (event)
@@ -603,6 +603,12 @@ the current style options."
;;; Command Hooks
+(defvar TeX-after-TeX-LaTeX-command-finished-hook nil
+ "Hook being run after TeX/LaTeX finished successfully.
+The functions in this hook are run with the DVI/PDF output file
+given as argument. Using this hook can be useful for updating
+the viewer automatically after re-compilation of the document.")
+
(defvar TeX-after-start-process-function nil
"Hooks to run after starting an asynchronous process.
Used by Japanese TeX to set the coding system.")
@@ -1110,7 +1116,12 @@ changed\\. Rerun LaTeX\\." nil t)
(setq TeX-command-next TeX-command-Show))
(t
(message "%s%s%s" name ": problems after " (TeX-current-pages))
- (setq TeX-command-next TeX-command-default))))
+ (setq TeX-command-next TeX-command-default)))
+ (unless TeX-error-list
+ (run-hook-with-args 'TeX-after-TeX-LaTeX-command-finished-hook
+ (with-current-buffer TeX-command-buffer
+ (expand-file-name
+ (TeX-active-master (TeX-output-extension)))))))
;; should go into latex.el? --pg
(defun TeX-BibTeX-sentinel (process name)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
doc/auctex.texi | 14 ++++++++++++++
tex-buf.el | 17 ++++++++++++++---
3 files changed, 37 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. a2a4777fbc2cec4c5ef7da74e17bf75b1dae4840,
Tassilo Horn <=