Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Emacs 24.3 come with BibTex mode, which is enabled automatically when editing .bib file. I got a strangely problem: whenever i make some modifications to a .bib file, i found a folder named "auto" is generated, and a .el file is saved there in the folder. for instance, when I edit a file called abc.bib, a abs.el file is generated in the folder "auto", which has content as follows:

(TeX-add-style-hook "abc"

 (lambda ()

    (LaTeX-add-bibitems)))

what is that for? and how can i disable that?

thanks

share|improve this question

1 Answer 1

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")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.