[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 3b5f047 67/78: Add supporto to ConTeXt Mark IV i
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 3b5f047 67/78: Add supporto to ConTeXt Mark IV in some sentinels. |
Date: |
Mon, 19 Oct 2015 09:11:14 +0000 |
branch: externals/auctex
commit 3b5f047045557baa00f6a5bc26cf1b24037145a8
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
Add supporto to ConTeXt Mark IV in some sentinels.
* context.el (TeX-ConTeXt-sentinel): Parse ConTeXt Mark IV output.
* tex-buf.el (TeX-TeX-sentinel-check): Ditto.
---
ChangeLog | 6 ++++++
context.el | 59 +++++++++++++++++++++++++++++++++++++----------------------
tex-buf.el | 24 ++++++++++++++++++++----
3 files changed, 63 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 61de4d3..b287587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-05 Mos� Giordano <address@hidden>
+
+ * context.el (TeX-ConTeXt-sentinel): Parse ConTeXt Mark IV output.
+
+ * tex-buf.el (TeX-TeX-sentinel-check): Ditto.
+
2015-10-05 Arash Esbati <address@hidden>
* style/newfloat.el (LaTeX-newfloat-auto-cleanup): Check if
diff --git a/context.el b/context.el
index 0aa7311..ccd32a5 100644
--- a/context.el
+++ b/context.el
@@ -564,28 +564,43 @@ inserted after the sectioning command."
;; Various
(defun TeX-ConTeXt-sentinel (process name)
"Cleanup TeX output buffer after running ConTeXt."
- (cond ((TeX-TeX-sentinel-check process name))
- ((save-excursion
- ;; in a full ConTeXt run there will multiple texutil
- ;; outputs. Just looking for "another run needed" would
- ;; find the first occurence
- (goto-char (point-max))
- (re-search-backward "TeXUtil " nil t)
- (re-search-forward "another run needed" nil t))
- (message (concat "You should run ConTeXt again "
- "to get references right, "
- (TeX-current-pages)))
- (setq TeX-command-next TeX-command-default))
- ((re-search-forward "removed files :" nil t)
- (message "sucessfully cleaned up"))
- ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange regexp
--pg
- (message (concat name ": successfully formatted "
- (TeX-current-pages)))
- (setq TeX-command-next TeX-command-Show))
- (t
- (message (concat name ": problems after "
- (TeX-current-pages)))
- (setq TeX-command-next TeX-command-default))))
+ (cond
+ ;; Mark IV
+ ((with-current-buffer TeX-command-buffer
+ (string= ConTeXt-Mark-version "IV"))
+ (cond ((TeX-TeX-sentinel-check process name))
+ ((re-search-forward "fatal error: " nil t)
+ (message (concat name ": problems after "
+ (TeX-current-pages name)))
+ (setq TeX-command-next TeX-command-default))
+ (t
+ (message (concat name ": successfully formatted "
+ (TeX-current-pages name)))
+ (setq TeX-command-next TeX-command-Show))))
+ ;; Mark II
+ (t
+ (cond ((TeX-TeX-sentinel-check process name))
+ ((save-excursion
+ ;; in a full ConTeXt run there will multiple texutil
+ ;; outputs. Just looking for "another run needed" would
+ ;; find the first occurence
+ (goto-char (point-max))
+ (re-search-backward "TeXUtil " nil t)
+ (re-search-forward "another run needed" nil t))
+ (message (concat "You should run ConTeXt again "
+ "to get references right, "
+ (TeX-current-pages)))
+ (setq TeX-command-next TeX-command-default))
+ ((re-search-forward "removed files :" nil t)
+ (message "sucessfully cleaned up"))
+ ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange
regexp --pg
+ (message (concat name ": successfully formatted "
+ (TeX-current-pages)))
+ (setq TeX-command-next TeX-command-Show))
+ (t
+ (message (concat name ": problems after "
+ (TeX-current-pages)))
+ (setq TeX-command-next TeX-command-default))))))
;;; Environments
diff --git a/tex-buf.el b/tex-buf.el
index bfe684e..d42b547 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1292,17 +1292,33 @@ errors or warnings to show."
Return nil ifs no errors were found."
(save-excursion
(goto-char (point-max))
- (if (re-search-backward "^Output written on \\(.*?\\) (\\([0-9]+\\) page"
- nil t)
+ (cond
+ ((and (string-match "ConTeXt" name)
+ (with-current-buffer TeX-command-buffer
+ (string= ConTeXt-Mark-version "IV")))
+ (when (re-search-backward " > result saved in file: \\(.*?\\), " nil t)
(let ((output-file (TeX-match-buffer 1)))
- (setq TeX-current-page (concat "{" (TeX-match-buffer 2) "}"))
;; Shave off quotation marks if present.
(when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
(setq output-file (match-string 1 output-file)))
(setq TeX-output-extension
(if (string-match "\\.\\([^.]*\\)$" output-file)
(match-string 1 output-file)
- "dvi")))))
+ "dvi")))
+ (if (re-search-forward ", \\([0-9]+\\) shipped pages, " nil t)
+ (setq TeX-current-page (concat "{" (TeX-match-buffer 1) "}")))))
+ (t
+ (if (re-search-backward "^Output written on \\(.*?\\) (\\([0-9]+\\) page"
+ nil t)
+ (let ((output-file (TeX-match-buffer 1)))
+ (setq TeX-current-page (concat "{" (TeX-match-buffer 2) "}"))
+ ;; Shave off quotation marks if present.
+ (when (string-match "\\`\"\\(.*\\)\"\\'" output-file)
+ (setq output-file (match-string 1 output-file)))
+ (setq TeX-output-extension
+ (if (string-match "\\.\\([^.]*\\)$" output-file)
+ (match-string 1 output-file)
+ "dvi")))))))
(if process (TeX-format-mode-line process))
(if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t)
(progn
- [elpa] externals/auctex a864241 55/78: Fixup space-before-tab git warned about., (continued)
- [elpa] externals/auctex a864241 55/78: Fixup space-before-tab git warned about., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 9b5827c 44/78: Fix typo in error message., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 3bb1cbe 56/78: Add font-latex specific prettify-symbols-compose-predicate, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 8a2bd0b 68/78: Fix previous commit., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex e85968c 66/78: Support caption.el and some other fixes., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex cac89e9 63/78: Start supporting ConTeXt Mark IV., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex ac8d479 69/78: Support newfloat.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 320de59 53/78: Apply some fixes to caption.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex ce8981a 64/78: Fontify math environment, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 0c4e740 62/78: Fix typo in comment., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 3b5f047 67/78: Add supporto to ConTeXt Mark IV in some sentinels.,
Tassilo Horn <=
- [elpa] externals/auctex 4a12225 72/78: Use `LaTeX-add-counters' on "LTchunksize"., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 1f116b8 74/78: Fill $...$ like \(...\) (bug#21645), Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 93d50ea 75/78: Do not disable PDF when using pstricks with XeTeX., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex f9a7928 59/78: Add new style newfloat.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 5ee567c 60/78: Append entries to LaTeX-label-alist in newfloat.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 96639fb 61/78: Fix previous commit., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 25a9c18 76/78: Define TeX-completing-read-multiple for Emacs 24.4 and later., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 1ec0278 65/78: Different approach to support ConTeXt Mark IV., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 6f77ad9 73/78: Split TeX-expand-list into a builtin and a custom list., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 7332f76 70/78: Add user-defined values to "style" key., Tassilo Horn, 2015/10/19