Hi Ikumi,

thanks for your quick response.

Please see below.

On Mon, Feb  9, 2026 at 23:23 (+0900), Ikumi Keita wrote:

> Hi Jim,

>>>>>> Jim Diamond <[email protected]> writes:
>> (7) I understand that there may be no ConTeXt users at AUCTeX headquarters,
>> so here is a very small ConTeXt file showing the problem:

>>     %%% cut here %%%
>>     \starttext
>>     \xyzzy
>>     \stoptext
>>     %%% cut here %%%

>> Here is the complete error message in that case:

>>     <<many lines of boilerplate ConTeXt log output of no interest>>
>>     ! Undefined control sequence
>> tex error       > tex error on line 2 in file ./a.tex: 

>>     <line 3.2> 
>>             \xyzzy

>>     1         \starttext
>>     2 >>      \xyzzy
>>     3         \stoptext
>>     4     
>> 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

>> TeX Output exited abnormally with code 1 at Sat Feb  7 14:42:40

> 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

I applied that patch, but unfortunately I get the same result.
(That is, it says "No more errors.")

> Unfortunately, I can't test it by myself because my current TeX Live
> installation seems to be partially broken; ConTeXt gives me mysterious
> message and refuses to run normally like this, even for normal ConTeXt
> file.😵
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> Running `ConTeXt' on `cont-eng' with ``context --once  --nonstop 
> cont-eng.tex''mtxrun          | forcing cache reload
> resolvers       | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/home/keita/texmf/web2c' from specification 'home:texmf/web2c'
> resolvers       | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/usr/texmf-local/web2c' from specification 
> 'selfautoparent:/texmf-local/web2c'
> resolvers       | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/usr/texmf-context/web2c' from specification 
> 'selfautoparent:/texmf-context/web2c'
> resolvers       | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/usr/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
> resolvers       | resolving | looking for fallback 'contextcnf.lua' on given 
> path '/home/keita/texmf/web2c' from specification 'home:texmf/web2c'
> resolvers       | resolving | looking for fallback 'contextcnf.lua' on given 
> path '/usr/texmf-local/web2c' from specification 
> 'selfautoparent:/texmf-local/web2c'
> resolvers       | resolving | looking for fallback 'contextcnf.lua' on given 
> path '/usr/texmf-context/web2c' from specification 
> 'selfautoparent:/texmf-context/web2c'
> resolvers       | resolving | looking for fallback 'contextcnf.lua' on given 
> path '/usr/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
> resolvers       | resolving |
> resolvers       | resolving | warning: no lua configuration files found
> resolvers       | resolving | no texmf paths are defined (using TEXMF)
> resolvers       | resolving |
> mtxrun          | the resolver databases are not present or outdated
> resolvers       | resolving | using suffix based filetype 'lua'
> resolvers       | resolving | remembering file 'mtx-context.lua' using hash 
> 'lua::mtx-context.lua'
> resolvers       | resolving | using suffix based filetype 'lua'
> resolvers       | resolving | remembering file 'mtx-contexts.lua' using hash 
> 'lua::mtx-contexts.lua'
> resolvers       | resolving | remembered file 'mtx-context.lua'
> resolvers       | resolving | using suffix based filetype 'lua'
> resolvers       | resolving | remembering file 'mtx-t-mtx-context.lua' using 
> hash 'lua::mtx-t-mtx-context.lua'
> resolvers       | resolving | using suffix based filetype 'lua'
> resolvers       | resolving | remembering file 'mtx-t-mtx-contexts.lua' using 
> hash 'lua::mtx-t-mtx-contexts.lua'
> resolvers       | resolving | remembered file 'mtx-t-mtx-context.lua'
> resolvers       | resolving | remembered file 'mtx-context.lua'
> mtxrun          | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'


> TeX Output finished at Sun Feb  8 19:14:59
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I am not enough of a ConTeXt expert to be able to immediately diagnose the
above problem, but I believe that your installation may need to be properly
(re-)initialized.  (I see "mtxrun" above, and that is not used for compiling
user documents, so it appears that it was trying to initialize and somehow
failed.)

I haven't had to re-initialize my ConTeXt, but google claims the following
to re-initialize a ConTeXt system:
        mtxrun --generate
        mtxrun --script fonts --reload --force
        context --make

Just out of curiosity, did you test with the TeXlive ConTeXt, the
stand-alone ConTeXt installation, or some other one yet?

If you are not using the stand-alone ConTeXt installation, but want to try
it, you can follow the directions at
        https://www.pragma-ade.nl/install.htm
The installation is quick, easy, and considerably smaller than installing
something like TeXlive.


>> (8) If I can be of any assistance testing a fix, don't hesitate to get back
>> to me.

> Thank you for your cooperation!

It is for me to thank you!  I very much appreciate any light you can shed
on the situation.  And whether or not your ConTeXt starts to behave, I am
happy to try out any patches you can suggest.

                                Jim



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

Reply via email to