我的 Emacs 24.3 自带了 BibTex 模式,在编辑 .bib 文件时会自动启用该模式。我遇到了一个奇怪的问题:每当我对 .bib 文件进行一些修改时,都会生成一个名为“auto”的文件夹,并且文件夹中会保存一个 .el 文件。例如,当我编辑一个名为 abc.bib 的文件时,会在“auto”文件夹中生成一个 abs.el 文件,其内容如下:
(TeX-add-style-hook "abc"
(lambda ()
(LaTeX-add-bibitems)))
这是为了什么?我该如何禁用它?
谢谢
答案1
我最好的猜测是它来自tex.el
。我不认为可以禁用该行为并仍然保持 AUCTeX 设想的功能。但是,看起来您可能可以修改路径以进入临时文件夹 - 例如/tmp/auto
- 但您需要确保查看 AUCTeX 中使用该变量的所有函数TeX-auto-local
并相应地调整这些路径(如果需要)。
(defcustom TeX-auto-local "auto"
"*Directory containing automatically generated TeX information.
This correspond to TeX macros found in the current directory, and must
be relative to that."
:group 'TeX-file
:type 'string)
以下是该变量的快速单词搜索:
/Users/HOME/.0.data/.0.emacs/elpa/auctex/tex.el:
1993 :type 'directory)
1994
1995: (defcustom TeX-auto-local "auto"
1996 "*Directory containing automatically generated TeX information.
1997
....
2121
2122 (defcustom TeX-auto-private
2123: (list (expand-file-name TeX-auto-local
2124 (or (and (boundp 'user-emacs-directory)
2125 (concat user-emacs-directory "auctex/"))
....
2155 (append (list TeX-auto-global TeX-style-global)
2156 TeX-auto-private TeX-style-private
2157: (list TeX-auto-local TeX-style-local)))
2158 path)
2159 "List of directories to search for AUCTeX style files.
2160 Per default the list is built from the values of the variables
2161 `TeX-auto-global', `TeX-style-global', `TeX-auto-private',
2162: `TeX-style-private', `TeX-auto-local', and `TeX-style-local'."
2163 :group 'TeX-file
2164 :type '(repeat (file :format "%v")))
....
2198 "./"))
2199 (TeX-style-path (append (list (expand-file-name
2200: TeX-auto-local dir)
2201 (expand-file-name
2202: TeX-auto-local master-dir)
2203 (expand-file-name
2204 TeX-style-local dir)
....
3167 (if TeX-auto-untabify
3168 (untabify (point-min) (point-max)))
3169: (if (and TeX-auto-save TeX-auto-local)
3170 (let* ((file (expand-file-name
3171 (concat
3172: (file-name-as-directory TeX-auto-local)
3173 (TeX-strip-extension nil TeX-all-extensions t)
3174 ".el")