Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
> Hongyi Zhao writes: > On Sun, Jul 4, 2021 at 9:42 PM Colin Baxter wrote: >> >> > Hongyi Zhao writes: >> >> > On Sun, Jul 4, 2021 at 9:19 PM Colin Baxter wrote: >> >> >> >> Hello Hongyi >> >> >> >> I'm curious - what's your setting for the variable >> >> "TeX-auto-local"? >> >> > `M-x describe-variable RET TeX-auto-local RET' Thanks - I didn't know that. Best wishes,
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
Hi Hongyi, > Hongyi Zhao writes: > According to my understanding, the `TeX-auto-global' variable setting > is intending to set the file's store location of the comprehensive > macro and variable hint lisp files, and the command > `TeX-auto-generate-global' is for generating the comprehensive macro > and variable hint lisp files. Right. See https://www.gnu.org/software/auctex/manual/auctex/Customizing.html . > But based on my later tries, it seems that there is no need to run the > above command at all, and auctex already can give wonderful and rather > extensive completion results with its initial configuration. As described in the above documentation, AUCTeX has built-in support for many major packages. But it doesn't offer support for *ALL* LaTeX packages. Running `TeX-auto-generate-global' analyses all packages installed on your TEXMFSYS tree at that time and generates support files which give completions etc. So you can obtain completions for packages which AUCTeX doesn't support by default. But beware that `TeX-auto-generate-global' is not so smart so that it sometimes introduces unexpected side effects.[1] Regards, Ikumi Keita [1] https://lists.gnu.org/r/auctex/2021-01/msg00037.html
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
On Sun, Jul 4, 2021 at 9:42 PM Colin Baxter wrote: > > > Hongyi Zhao writes: > > > On Sun, Jul 4, 2021 at 9:19 PM Colin Baxter wrote: > >> > >> Hello Hongyi > >> > >> I'm curious - what's your setting for the variable > >> "TeX-auto-local"? > > > `M-x describe-variable RET TeX-auto-local RET' > > > TeX-auto-local is a variable defined in ‘tex.el’. > > Thanks. I asked because I've set my TeX-auto-local to > ~/.emacs.d/auctex/auto-local. It seems to be the only 'TeX-local' > variable that ever gets used. I have set TeX-auto-global to > ~/.emacs.d/auctex/auto-global and it's always empty. You must run the following command to generate the stuff populated in this directory: `M-x TeX-auto-generate-global RET' See [1] for more detailed information. [1] https://www.gnu.org/software/auctex/manual/auctex/Customizing.html > I guess all the > work is being done by TeX-auto-local. I have certainly wondered when > Tex-auto-global is ever used. > > Best wishes, > > Colin. HY -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
> Hongyi Zhao writes: > On Sun, Jul 4, 2021 at 9:19 PM Colin Baxter wrote: >> >> Hello Hongyi >> >> I'm curious - what's your setting for the variable >> "TeX-auto-local"? > `M-x describe-variable RET TeX-auto-local RET' > TeX-auto-local is a variable defined in ‘tex.el’. Thanks. I asked because I've set my TeX-auto-local to ~/.emacs.d/auctex/auto-local. It seems to be the only 'TeX-local' variable that ever gets used. I have set TeX-auto-global to ~/.emacs.d/auctex/auto-global and it's always empty. I guess all the work is being done by TeX-auto-local. I have certainly wondered when Tex-auto-global is ever used. Best wishes, Colin.
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
On Sun, Jul 4, 2021 at 9:19 PM Colin Baxter wrote: > > Hello Hongyi > > I'm curious - what's your setting for the variable "TeX-auto-local"? `M-x describe-variable RET TeX-auto-local RET' TeX-auto-local is a variable defined in ‘tex.el’. Its value is ".auctex-auto" Original value was "auto" You can customize this variable. Directory containing automatically generated TeX information. This correspond to TeX macros found in the current directory, and must be relative to that. HY > > Best wishes, > > Colin Baxter. -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
Hello Hongyi I'm curious - what's your setting for the variable "TeX-auto-local"? Best wishes, Colin Baxter.
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
> Hongyi Zhao writes: >> Running `TeX-auto-generate-global' analyses all packages installed on >> your TEXMFSYS tree at that time and generates support files which give >> completions etc. So you can obtain completions for packages which >> AUCTeX doesn't support by default. >> >> But beware that `TeX-auto-generate-global' is not so smart so that it >> sometimes introduces unexpected side effects.[1] > If I want to enable `TeX-auto-generate-global' and minimize the > probability of adverse effects, what's the suggested best practice? Unfortunately, there's no such best practice as far as I can see. You have to modify the generated elisp files by hand each time when you find some shortcomings. Regards, Ikumi Keita
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
On Sun, Jul 4, 2021 at 3:42 PM Ikumi Keita wrote: > > Hi Hongyi, > > > Hongyi Zhao writes: > > According to my understanding, the `TeX-auto-global' variable setting > > is intending to set the file's store location of the comprehensive > > macro and variable hint lisp files, and the command > > `TeX-auto-generate-global' is for generating the comprehensive macro > > and variable hint lisp files. > > Right. See https://www.gnu.org/software/auctex/manual/auctex/Customizing.html > . > > > But based on my later tries, it seems that there is no need to run the > > above command at all, and auctex already can give wonderful and rather > > extensive completion results with its initial configuration. > > As described in the above documentation, AUCTeX has built-in support for > many major packages. But it doesn't offer support for *ALL* LaTeX > packages. > Running `TeX-auto-generate-global' analyses all packages installed on > your TEXMFSYS tree at that time and generates support files which give > completions etc. So you can obtain completions for packages which > AUCTeX doesn't support by default. > > But beware that `TeX-auto-generate-global' is not so smart so that it > sometimes introduces unexpected side effects.[1] If I want to enable `TeX-auto-generate-global' and minimize the probability of adverse effects, what's the suggested best practice? > > Regards, > Ikumi Keita > > [1] https://lists.gnu.org/r/auctex/2021-01/msg00037.html HY -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
On Sun, Jul 4, 2021 at 1:58 PM Mandar Mitra wrote: > > Hongyi Zhao wrote (Sun, Jul 04, 2021 at 11:10:55AM +0800): > > This way, the above command won't need root privilege. But based on my > > later tries, it seems that there is no need to run the above command > > at all, and auctex already can give wonderful and rather extensive > > completion results with its initial configuration. To be frank, I'm > > still not sure on the usage and function of TeX-auto-generate-global > > and TeX-auto-global [1]. > > > > Any hints will be highly appreciated. > > From tex-site.el: > > (defcustom TeX-auto-global > (if (file-writable-p "/usr/local/var/auctex") "/usr/local/var/auctex" > "~/.emacs.d/auctex") > ... But I don't have all the folders above: werner@X10DAi:~$ ~/.emacs.d/auctex bash: /home/werner/.emacs.d/auctex: No such file or directory werner@X10DAi:~$ /usr/local/var/auctex bash: /usr/local/var/auctex: No such file or directory > > Also, you probably have set TeX-parse-self to t as recommended in the basic > setup. Yes. See all settings below on my Ubuntu 20.04 box: (load "auctex.el" nil t t) (load "preview-latex.el" nil t t) (setq TeX-parse-self t ; parse on load TeX-auto-save t ; parse on save ;; use hidden dirs for auctex files TeX-auto-local ".auctex-auto" TeX-style-local ".auctex-style" TeX-source-correlate-mode t TeX-source-correlate-method 'synctex ;; don't start the emacs server when correlating sources TeX-source-correlate-start-server nil ;; automatically insert braces after sub/superscript in math mode TeX-electric-sub-and-superscript t ;; just save, dont ask me before each compilation TeX-save-query nil) > I guess this combination explains why things "just work"? I am still not very clear about its working mechanism. Any more hints? > -mandar > Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China
Re: On the usage and function of TeX-auto-generate-global and TeX-auto-global.
Hongyi Zhao wrote (Sun, Jul 04, 2021 at 11:10:55AM +0800): > This way, the above command won't need root privilege. But based on my > later tries, it seems that there is no need to run the above command > at all, and auctex already can give wonderful and rather extensive > completion results with its initial configuration. To be frank, I'm > still not sure on the usage and function of TeX-auto-generate-global > and TeX-auto-global [1]. > > Any hints will be highly appreciated. >From tex-site.el: (defcustom TeX-auto-global (if (file-writable-p "/usr/local/var/auctex") "/usr/local/var/auctex" "~/.emacs.d/auctex") ... Also, you probably have set TeX-parse-self to t as recommended in the basic setup. I guess this combination explains why things "just work"? -mandar
On the usage and function of TeX-auto-generate-global and TeX-auto-global.
On Ubuntu 20.04, I'm using texlive 2021, git master Emacs and auctex. I noticed the variable `TeX-auto-global' and relative command `TeX-auto-generate-global' defined in auctex. According to my understanding, the `TeX-auto-global' variable setting is intending to set the file's store location of the comprehensive macro and variable hint lisp files, and the command `TeX-auto-generate-global' is for generating the comprehensive macro and variable hint lisp files. So, I tried with the following testing/configuration/operation. The `TeX-auto-global' variable is set by: (setq TeX-auto-global "~/.local/var/auctex/") Then, in Emacs, run the following command: M-x TeX-auto-generate-global RET This way, the above command won't need root privilege. But based on my later tries, it seems that there is no need to run the above command at all, and auctex already can give wonderful and rather extensive completion results with its initial configuration. To be frank, I'm still not sure on the usage and function of TeX-auto-generate-global and TeX-auto-global [1]. Any hints will be highly appreciated. [1] I've posted my confusion on <https://github.com/raxod502/straight.el/issues/802#issuecomment-863726482>, but considering that here is the appropriate list for such issues, so I repost it here. Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China