[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex a2a4777 25/35: Add TeX-after-TeX-LaTeX-command-f
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex a2a4777 25/35: Add TeX-after-TeX-LaTeX-command-finished-hook |
Date: |
Sun, 22 Mar 2015 09:27:06 +0000 |
branch: externals/auctex
commit a2a4777fbc2cec4c5ef7da74e17bf75b1dae4840
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
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.
---
ChangeLog | 9 +++++++++
doc/auctex.texi | 14 ++++++++++++++
tex-buf.el | 17 ++++++++++++++---
3 files changed, 37 insertions(+), 3 deletions(-)
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)
- [elpa] externals/auctex 566426b 08/35: New style for color.sty, (continued)
- [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
- [elpa] externals/auctex 59f9440 26/35: Fix void-function error occuring if cl is not loaded, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 4034de2 21/35: New style for caption.sty., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex a2a4777 25/35: Add TeX-after-TeX-LaTeX-command-finished-hook,
Tassilo Horn <=
- [elpa] externals/auctex b853739 17/35: Add uninstall rules to Makefiles., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex d23de0a 18/35: Style for bidibeamer which delegates to beamer, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex a375093 20/35: New style enumitem.el, Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 69b02a0 22/35: New style for geometry.sty., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 003f475 28/35: New style ltablex.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex f16c051 31/35: Fix header of style/mn2e.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 8d7fef3 27/35: Improve styles enumitem.el and caption.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex 6896a4c 32/35: Fix of the fix. Really., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex fd04166 29/35: New style ltxtable.el., Tassilo Horn, 2015/03/22
- [elpa] externals/auctex b1e9217 30/35: Style file for mn2e.cls., Tassilo Horn, 2015/03/22