Hi Keita,
Ikumi Keita <[email protected]> writes:
> Thank you for your report. Though I haven't understand the culprit yet,
> I noticed a difference between `TeX-LaTeX-sentinel' and
> `TeX-ConTeXt-sentinel'. Could you try the following patch if you know
> how to use it?
>
> diff --git a/context.el b/context.el
> index 25cbeb34..d248859f 100644
> --- a/context.el
> +++ b/context.el
> @@ -606,7 +606,7 @@ for a label to be inserted after the sectioning command."
> (message (concat name ": problems after "
> (TeX-current-pages)))
> (setq TeX-command-next TeX-command-default)))))
> - (unless TeX-error-list
> + (unless (TeX-error-report-has-errors-p)
> (run-hook-with-args 'TeX-after-compilation-finished-functions
> (with-current-buffer TeX-command-buffer
> (expand-file-name
Thanks for looking at this issue. I applied your suggestion and tried
it, but no avail. Maybe Jim has different results.
I only had a brief look, and I think we have to touch
`TeX-TeX-sentinel-check' again. First, I think we should do this to
context.el:
--8<---------------cut here---------------start------------->8---
diff --git a/context.el b/context.el
index 25cbeb34..001d765f 100644
--- a/context.el
+++ b/context.el
@@ -573,7 +573,7 @@ for a label to be inserted after the sectioning command."
;; Mark IV
((with-current-buffer TeX-command-buffer
(string= ConTeXt-Mark-version "IV"))
- (cond ((TeX-TeX-sentinel-check process name))
+ (cond ((not (TeX-TeX-sentinel-check process name)))
((re-search-forward "fatal error: " nil t)
(message (concat name ": problems after "
(TeX-current-pages)))
--8<---------------cut here---------------end--------------->8---
,----[ C-h f TeX-TeX-sentinel-check RET ]
| TeX-TeX-sentinel-check is a native-comp-function in ‘tex.el’.
|
| (TeX-TeX-sentinel-check PROCESS NAME)
|
| Cleanup TeX output buffer after running TeX.
| Return nil only if no errors were found.
|
`----
In the case above, the first cond-clause wins because
`TeX-TeX-sentinel-check' returns non-nil (it finds an error), so the
search for "fatal error" never happens.
Next, ConTeXt emits a "fancy" error message. Consider this file:
--8<---------------cut here---------------start------------->8---
\starttext
\xyzzy
\stoptext
%%% Local Variables:
%%% mode: ConTeXt
%%% TeX-master: t
%%% ConTeXt-Mark-version: "IV"
%%% End:
--8<---------------cut here---------------end--------------->8---
Running context on it says:
--8<---------------cut here---------------start------------->8---
! Undefined control sequence
tex error > tex error on line 2 in file ./context-test.tex:
<line 3.2>
--8<---------------cut here---------------end--------------->8---
Now take this plain-TeX file:
--8<---------------cut here---------------start------------->8---
% \starttext
\xyzzy
% \stoptext
%%% Local Variables:
%%% mode: plain-TeX
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
Running tex on it gives:
--8<---------------cut here---------------start------------->8---
(./context-test.tex
./context-test.tex:4: Undefined control sequence.
l.4 \xyzzy
)
--8<---------------cut here---------------end--------------->8---
which AUCTeX parses correctly. Again, I only had a very brief look, so
apologies if the above is off.
Best, Arash
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex