Hi Ikumi, On Wed, Apr 1, 2026 at 15:53 (+0900), Ikumi Keita wrote:
>>>>>> Jim <[email protected]> writes: >>> Well, such document is what I called "exceptional case". 😅 >> I agree. But if I pushed a patch and it was accepted, and that patch broke >> functionality which even 3 AUCTeX users use, there might be a (very small) >> uproar. ;-) > In my opinion, standalone package is out of scope of AUCTeX "master > file" notion. So I recommend you to stop worrying over standalone > package. OK, I am always happy to have one less thing to worry about. ;-) > Let's concentrate on fixing region compilation to work with ConTeXt sub > files. (When standalone package is used, a "sub file" can be both a > master file of itself and a sub file of another. AUCTeX doesn't expect > such situation and can't handle it in perfectly consistent way. I think > users of standalone package who use AUCTeX should be aware of that > limitation and actually are.) That's perfect, thanks. >> Yes, I see that. Of course, in this case, there is no need to look in the >> sub-file at all, since it has no preamble. So I hypothesize that the code >> in tex.el which looks through the sub-file for a preamble is there >> explicitly for those 3 people that have exceptional usage. > I don't think so. standalone package is relatively new[1] and > `TeX-region-create' is much older. The behavior of `TeX-region-create' > you are talking about must be just for simplicity. Perhaps that is the case. > [1] https://www.ctan.org/pkg/standalone It seems that standalone was > born in 2010. It's just a baby. ;-) (Actually, I suppose it is probably an adolescent, maybe with anti-social manners.) >> Yes, but for those 3 exceptional people, is it doing The Right Thing? > As I said above, I think we don't have to worry about that. In my > opinion, we just can't define The Right Thing for the sub file under > standalone package. OK. If that is how you and Arash feel (and no-one else has said anything) then I am very happy to go ahead without worrying about it. >> Q: When I do C-c C-b in a sub-file, and there is an error, C-c ` takes me >> to _region_.tex, rather than keeping me in my current file. >> Is this expected, or is this only happening in the ConTeXt case? > Not only for ConTeXt, but also for plain TeX and Texinfo. We need a > working parser for error message, but AUCTeX has only one for LaTeX. That is maybe a bit imprecise, in that (as of recently) AUCTeX will now handle ConTeXt error messages in the C-c C-c case (at least in my usage). I have been busy editing one large (multi-file) document, and so I have not yet tried a large variety of possibilities. But I did announce the improvement for parsing error messages on the ConTeXt email list, and I know there are a couple of AUCTeX users there, so perhaps it is working quite well when _region_.tex is not involved. I'll add that to my list of things to think about. Thanks for your thoughts. Jim
