Re: Let \ref{} and \eqref{} trigger the already defined labels list for completion.

2023-05-27 Thread Hongyi Zhao
On Sun, May 28, 2023 at 12:47 AM Arash Esbati  wrote:
>
> Hongyi Zhao  writes:
>
> > Thank you. It works. But why must you first run `C-c C-n'?
>
> AUCTeX parsing abilities are disabled by default for various reasons
> (search the archives for the reasons).  Check the manual for some
> possibilities how you can configure AUCTeX acc. to your needs in that
> regard.

It's the following setting, as explained in the document here [1],
which I enabled so far:

 (setq TeX-parse-self t) ; Enable parse on load.
 (setq TeX-auto-save t) ; Enable parse on save.

[1] https://www.gnu.org/software/auctex/manual/auctex/Parsing-Files.html

> Best, Arash

Regards,
Zhao



Re: Let \ref{} and \eqref{} trigger the already defined labels list for completion.

2023-05-27 Thread Arash Esbati
Hongyi Zhao  writes:

> Thank you. It works. But why must you first run `C-c C-n'?

AUCTeX parsing abilities are disabled by default for various reasons
(search the archives for the reasons).  Check the manual for some
possibilities how you can configure AUCTeX acc. to your needs in that
regard.

Best, Arash



Re: Let \ref{} and \eqref{} trigger the already defined labels list for completion.

2023-05-27 Thread Hongyi Zhao
On Sat, May 27, 2023 at 6:31 PM Arash Esbati  wrote:
>
> Hongyi Zhao  writes:
>
> > Is there a way to let \ref{} and \eqref{} trigger the already defined
> > labels list for completion?
>
> This feature is already implemented in AUCTeX, just parse your document
> with `C-c C-n' and check the value of `LaTeX-label-list'.  If it is
> non-nil, you should get completion OOTB.  See attachment for an example
> how it looks for me with a small file.

Thank you. It works. But why must you first run `C-c C-n'?

> Best, Arash

Regards,
Zhao



Re: Let \ref{} and \eqref{} trigger the already defined labels list for completion.

2023-05-27 Thread Arash Esbati
Hongyi Zhao  writes:

> Is there a way to let \ref{} and \eqref{} trigger the already defined
> labels list for completion?

This feature is already implemented in AUCTeX, just parse your document
with `C-c C-n' and check the value of `LaTeX-label-list'.  If it is
non-nil, you should get completion OOTB.  See attachment for an example
how it looks for me with a small file.

Best, Arash