Jim Diamond <[email protected]> writes:

> Unfortunately, not.

I thought so, but thanks for confirming.

> Did that change do anything for you?

Yes, AUCTeX now says:

  ConTeXt: problems after [0] pages

> In my case, it didn't even give me the "... errors ... Use C-c ` to
> display" message.

  ConTeXt errors in ‘*foo output*’. Use C-c ` to display.

is still emitted, it comes just before the other message above, but
we're not still there.

> Seeing "Mark IV" in that code did give me one concern...
> I suspect most (if not virtually all) ConTeXt users at now using LMTX.
> I wonder if any differences between MkIV and LMTX are significant for
> AUCTeX.

Yes, you see that ConTeXt support in AUCTeX didn't receive much love
lately.  It would be great if Someone™ would start updating that part.

> FWIW, I don't follow you there.  Isn't there a search for "fatal error"
> exactly when TeX-TeX-sentinel-check returns non-nil?

This is `TeX-ConTeXt-sentinel':

  (defun TeX-ConTeXt-sentinel (process name)
    "Cleanup TeX output buffer after running ConTeXt."
    (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)))
             (setq TeX-command-next TeX-command-default))
            (t
             (message (concat name ": successfully formatted "
                              (TeX-current-pages)))
             (setq TeX-command-next TeX-command-Show))))
      ...

Running your example gives:

  ! Undefined control sequence
  tex error       > tex error on line 4 in file ./context-test.tex:

`TeX-ConTeXt-sentinel' runs (TeX-TeX-sentinel-check process name) which
sees ! at the beginning of line and returs non-nil
(`TeX-TeX-sentinel-check' returns nil if it doesn't find an error).  So
the search for "fatal error: " isn't run.  Or am I missing something?

> Further, ConTeXt (apparently) never outputs "fatal error", so
> searching for that doesn't seem fruitful.

This is what I see when I run the example I sent upthread:

--8<---------------cut here---------------start------------->8---
! Undefined control sequence
tex error       > tex error on line 4 in file ./context-test.tex: 

<line 3.4> 
    \xyzzy

 1     
 2     
 3     \starttext
 4 >>  \xyzzy
 5     \stoptext
 6     
 7     %%% Local Variables:
 8     %%% mode: ConTeXt
 9     %%% TeX-master: t
10     %%% ConTeXt-Mark-version: "IV"
11     %%% End:
12     
The control sequence at the end of the top line of your error message
was never\def'ed. You can just continue as I'll forget about whatever
was undefined.
mtx-context     | fatal error: return code: 1
--8<---------------cut here---------------end--------------->8---

Do you see something different?

Does ConTeXt have a command-line switch in order to emit usual TeX
errors instead of the above?  Maybe that's enough for us?

Best, Arash



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to