On Sat, Feb 14, 2026 at 10:14 (+0100), Arash Esbati wrote:

> Jim Diamond <[email protected]> writes:

>> Well, I will say there were some very old memories that got somewhat
>> awakened.  But definitely the thought that I need to approach elisp
>> development in a more efficient manner next time.

> I suspect this means you will work further on ConTeXt support ;-)

Funny you should say that... see below.

>> I have no recollection of doing so.  Possibly in the distant past.

> I checked that now; you haven't done that in until now, so you have to
> start the process.

>> The form I got to from your link says
>> Please email the following information to [email protected]

>> Is that the correct place to send it for AUCTeX patches as well?

> Just fill this form:

> https://cgit.git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future

> and send send it to [email protected].  I suggest you answer this question:

> [What is the name of the program or package you're contributing to?]

> with GNU Emacs and not with GNU AUCTeX.  This will make life easier if
> you contribute to Emacs itself at some point.

Arash, Ikumi and anyone else reading...

I did send that form in already, and heard nothing.  So I changed it as you
suggested and sent it again.  Maybe it will "take" this time.

I am attaching a second patch to this email.
-> It adds support for plain TeX so that
        TeX-after-compilation-finished-functions
   is called after a successful compilation.

-> It adds support for ConTeXt so that
        TeX-after-compilation-finished-functions
   is called after a successful compilation.
   (Yeah, that feature got lost in my first patch because I was following
   along the TeX-TeX-sentinel code when I rewrote TeX-ConTeXt-sentinel. Duh.)

                                Jim

>From 64593437edf7470f88c166efb0cf4ae58956213f Mon Sep 17 00:00:00 2001
From: Jim Diamond <[email protected]>
Date: Sat, 14 Feb 2026 12:31:36 -0400
Subject: [PATCH] Fix both plain TeX and my previous update to ConTeXt so that 
    TeX-after-compilation-finished-functions are called after a compile
 attempt.

---
 context.el | 15 ++++++++++++---
 tex.el     |  9 ++++++++-
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/context.el b/context.el
index 7ff3f1cc..12bb4ebd 100644
--- a/context.el
+++ b/context.el
@@ -568,6 +568,7 @@ for a label to be inserted after the sectioning command."
 
 ;; Various
 
+;; This function is called with (current-buffer) = the output buffer.
 (defun TeX-ConTeXt-sentinel-check (process name)
   "Check ConTeXt (LMTX) output buffer after running TeX.
   Return  t  if errors were found."
@@ -624,7 +625,6 @@ for a label to be inserted after the sectioning command."
 )
 
 
-
 (defun TeX-ConTeXt-sentinel (process name)
   "Cleanup TeX output buffer after running ConTeXt.
 
@@ -637,8 +637,11 @@ for a label to be inserted after the sectioning command."
   
   (if (TeX-ConTeXt-sentinel-check process name)
       (progn
-       ;; Since ConTeXt LMTX stops after 1 error, it might make sense to
-       ;; just call (TeX-parse-error) once (and set the other variables
+       ;; ConTeXt LMTX stops after 1 error, unless heroic efforts
+       ;; are made by the user, and if such efforts are made the error 
+       ;; messages in the log file are not complete (at least as of 
+       ;; Version 2026.02.12) it might make sense to just call
+       ;; (TeX-parse-error) once (and set the other variables
        ;; as seen in (TeX-parse-all-errors)).
         (if TeX-parse-all-errors
             (TeX-parse-all-errors))
@@ -651,6 +654,12 @@ for a label to be inserted after the sectioning command."
       (message (concat name ": formatted " (TeX-current-pages)))
       (setq TeX-command-next TeX-command-Show)
    )
+
+   (unless TeX-error-list
+       (run-hook-with-args 'TeX-after-compilation-finished-functions
+                        (with-current-buffer TeX-command-buffer
+                          (expand-file-name 
+                          (TeX-active-master (TeX-output-extension))))))
 )
 
 
diff --git a/tex.el b/tex.el
index fd806c66..201eed53 100644
--- a/tex.el
+++ b/tex.el
@@ -8572,7 +8572,14 @@ errors or warnings to show."
       (if (with-current-buffer TeX-command-buffer
             (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI))))
           (setq TeX-command-next dvi2pdf)
-        (setq TeX-command-next TeX-command-Show)))))
+        (setq TeX-command-next TeX-command-Show))))
+
+   (unless TeX-error-list
+       (run-hook-with-args 'TeX-after-compilation-finished-functions
+                        (with-current-buffer TeX-command-buffer
+                          (expand-file-name 
+                          (TeX-active-master (TeX-output-extension))))))
+)
 
 (defun TeX-current-pages ()
   "Return string indicating the number of pages formatted."
-- 
2.46.4

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

Reply via email to