Режим emacs BibTex автоматически сохраняет файл .el file

389
shelper

Мой Emacs 24.3 поставляется с режимом BibTex, который включается автоматически при редактировании файла .bib. У меня возникла странная проблема: всякий раз, когда я делаю некоторые изменения в файле .bib, я обнаруживаю, что создается папка с именем «auto», и файл .el сохраняется там в папке. например, когда я редактирую файл с именем abc.bib, файл abs.el создается в папке «auto», которая имеет следующее содержимое:

(TeX-add-style-hook "abc"  (lambda ()  (LaTeX-add-bibitems))) 

для чего это? и как я могу отключить это?

Спасибо

0

1 ответ на вопрос

1
lawlist

My best guess is that it comes from tex.el. I do not think that behavior can be disabled and still maintain the functionality contemplated by AUCTeX. However, it looks like you could probably modify the path to go into a temporary folder instead -- e.g., /tmp/auto -- but you would need to make sure you look at all the functions within AUCTeX that use the variable TeX-auto-local and adjust those paths accordingly (if needed).

(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) 

Here is a quick word-search for that variable:

/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") 

Похожие вопросы