Re: Limit the number of regexps

2023-09-28 Thread Hoffmann, Jobst
Am Donnerstag, dem 28.09.2023 um 08:33 +0200 schrieb Arash Esbati:
> "Hoffmann, Jobst"  writes:
> 
> > Correct, my setting is
> > 
> >   (setq-default TeX-auto-regexp-list 'TeX-auto-full-regexp-list)
> >     ; following an advice from Ikumi
> > Keita,
> >     ; mail from 2023-09-26
> > 
> > I hope, I've got this right
> 
> Thanks for the confirmation.  Reg. your setting above: Note that
> you're
> setting the variable `TeX-auto-regexp-list' to its default value[1]. 
> So
> basically, you can remove the lines above from your init file.

Thanks for information, I will do so.

> 
> Best, Arash
> 
> Footnotes:
> [1]  https://git.savannah.gnu.org/cgit/auctex.git/tree/tex.el#n4235
> 
> 

-- 
Prof. i.R. Dr. Jobst Hoffmann
Fachhochschule Aachen Abt. Jülich
Fachbereich 09  email: j.hoffm...@fh-aachen.de




Re: Limit the number of regexps

2023-09-28 Thread Arash Esbati
"Hoffmann, Jobst"  writes:

> Correct, my setting is
>
>   (setq-default TeX-auto-regexp-list 'TeX-auto-full-regexp-list)
> ; following an advice from Ikumi Keita,
> ; mail from 2023-09-26
>
> I hope, I've got this right

Thanks for the confirmation.  Reg. your setting above: Note that you're
setting the variable `TeX-auto-regexp-list' to its default value[1].  So
basically, you can remove the lines above from your init file.

Best, Arash

Footnotes:
[1]  https://git.savannah.gnu.org/cgit/auctex.git/tree/tex.el#n4235




Re: Limit the number of regexps

2023-09-27 Thread Hoffmann, Jobst
Am Mittwoch, dem 27.09.2023 um 22:54 +0200 schrieb Arash Esbati:
> "Hoffmann, Jobst"  writes:
> 
> > I've applied the patch to my current AUCTeX installation and it is
> > working fine now.
> 
> Thanks for your swift response.  I presume this works for your large
> document without setting `TeX-auto-regexp-list' to
> `LaTeX-auto-minimal-regexp-list'?

Correct, my setting is

  (setq-default TeX-auto-regexp-list 'TeX-auto-full-regexp-list)
; following an advice from Ikumi Keita,
; mail from 2023-09-26

I hope, I've got this right

Kind regards
Jobst

> 
> Best, Arash
> 
> 


-- 
Prof. i.R. Dr. Jobst Hoffmann
Fachhochschule Aachen Abt. Jülich
Fachbereich 09  email: j.hoffm...@fh-aachen.de




Re: Limit the number of regexps

2023-09-27 Thread Arash Esbati
"Hoffmann, Jobst"  writes:

> I've applied the patch to my current AUCTeX installation and it is
> working fine now.

Thanks for your swift response.  I presume this works for your large
document without setting `TeX-auto-regexp-list' to
`LaTeX-auto-minimal-regexp-list'?

Best, Arash




Re: Limit the number of regexps

2023-09-27 Thread Hoffmann, Jobst
Am Mittwoch, dem 27.09.2023 um 22:09 +0200 schrieb Arash Esbati:
> Ikumi Keita  writes:
> 
> > To developers:
> > 
> > It seems that we should revisit this Arash's proposal now. What do
> > you
> > think about it?
> > https://lists.gnu.org/r/auctex-devel/2023-07/msg00014.html
> 
> I still think it is a good idea ;-)  I installed a series of small
> patches fixing the easy issues.  In sum, AUCTeX now uses 25 regexp
> groups less.  I still see potential in this area, but I'm also
> reluctant
> to touch it right away.
> 
> @Jobst: Do you have the chance to update your AUCTeX installation and
> see if your issue is also fixed after my changes?  TIA.

I've applied the patch to my current AUCTeX installation and it is
working fine now.

> 
> Best, Arash
> 
> 

-- 
Prof. i.R. Dr. Jobst Hoffmann
Fachhochschule Aachen Abt. Jülich
Fachbereich 09  email: j.hoffm...@fh-aachen.de




Re: Limit the number of regexps

2023-09-27 Thread Arash Esbati
Ikumi Keita  writes:

> To developers:
>
> It seems that we should revisit this Arash's proposal now. What do you
> think about it?
> https://lists.gnu.org/r/auctex-devel/2023-07/msg00014.html

I still think it is a good idea ;-)  I installed a series of small
patches fixing the easy issues.  In sum, AUCTeX now uses 25 regexp
groups less.  I still see potential in this area, but I'm also reluctant
to touch it right away.

@Jobst: Do you have the chance to update your AUCTeX installation and
see if your issue is also fixed after my changes?  TIA.

Best, Arash




Re: Limit the number of regexps

2023-09-26 Thread Hoffmann, Jobst
Hi Ikumi,

thanks for your clarification. I followed your advice and additionaly I
applied the patch proposed by Arash. The error message is gone now, so
I'm happy with this patch.

I did not benchmark the patched AUCTeX, but the behaviour seems to be ok
- at least for me.

Kind regards
Jobst

PS. Resent to auctex@gnu.org

Am Dienstag, dem 26.09.2023 um 16:06 +0900 schrieb Ikumi Keita:
> Hi Jobst,
> 
> > > > > > "Hoffmann, Jobst"  writes:
> > While I'm working on a large LaTeX (multifile) document, I stumble
> > over
> > the error message
> 
> > TeX-auto-parse-region: The TeX auto-parser’s regexp has too many
> > groups
> > (261)
> 
> > upon C-c C-n or after opening another file of the document, even if
> > I
> > say 
> 
> > (setq TeX-auto-regexp-list LaTeX-auto-minimal-regexp-list)
> 
> That is ineffective because `TeX-auto-regexp-list' is a variable which
> always becomes buffer-local when set. That `setq' sets the value only
> in
> the buffer you evaluates it.
> (Even if you evaluated it in the document buffer, C-c C-n didn't work
> as
> expected because it kills all buffer local values.)
> 
> > That prevents all actions with cross references, is there a way to
> > circumvent that limit?
> 
> Try either one:
> 1. Set the default value by `setq-default', rather than `setq'. (Or
> use
>    M-x customize-option RET TeX-auto-regexp-list RET )
> 2. Put the file local variables section like this and type C-c C-n:
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-auto-regexp-list: LaTeX-auto-minimal-regexp-list
> %%% End:
> 
> To developers:
> 
> It seems that we should revisit this Arash's proposal now. What do you
> think about it?
> https://lists.gnu.org/r/auctex-devel/2023-07/msg00014.html
> 
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine


-- 
Prof. i.R. Dr. Jobst Hoffmann
Fachhochschule Aachen Abt. Jülich
Fachbereich 09  email: j.hoffm...@fh-aachen.de




Re: Limit the number of regexps

2023-09-26 Thread Ikumi Keita
Hi Jobst,

> "Hoffmann, Jobst"  writes:
> While I'm working on a large LaTeX (multifile) document, I stumble over
> the error message

> TeX-auto-parse-region: The TeX auto-parser’s regexp has too many groups
> (261)

> upon C-c C-n or after opening another file of the document, even if I
> say 

> (setq TeX-auto-regexp-list LaTeX-auto-minimal-regexp-list)

That is ineffective because `TeX-auto-regexp-list' is a variable which
always becomes buffer-local when set. That `setq' sets the value only in
the buffer you evaluates it.
(Even if you evaluated it in the document buffer, C-c C-n didn't work as
expected because it kills all buffer local values.)

> That prevents all actions with cross references, is there a way to
> circumvent that limit?

Try either one:
1. Set the default value by `setq-default', rather than `setq'. (Or use
   M-x customize-option RET TeX-auto-regexp-list RET )
2. Put the file local variables section like this and type C-c C-n:
%%% Local Variables:
%%% mode: latex
%%% TeX-auto-regexp-list: LaTeX-auto-minimal-regexp-list
%%% End:

To developers:

It seems that we should revisit this Arash's proposal now. What do you
think about it?
https://lists.gnu.org/r/auctex-devel/2023-07/msg00014.html

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine