I use the following code in .emacs
to clean the working directory from
unwanted files.
(eval-after-load 'latex
'(progn
(setq LaTeX-clean-intermediate-suffixes (delete "\\.synctex\\.gz" LaTeX-clean-intermediate-suffixes))
(setq LaTeX-clean-intermediate-suffixes (append
LaTeX-clean-intermediate-suffixes
(list "\\.bcf" "\\.synctex\\.gz(busy)" "-blx\\.bib" "\\.run\\.xml" "\\.fdb_latexmk" "\\.fls" "\\.ptc")))
(setq LaTeX-clean-output-suffixes (append LaTeX-clean-output-suffixes (list "\\.synctex\\.gz")))
))
If my LaTeX document contains an error, the current directory contains a folder
.t2d
(I compile with texi2dvi -p
from within Emacs/AUCTeX). I have to
manually switch to the working directory to remove this folder as, otherwise,
the document would not compile (in fact, compilation would stop with the same
error [in most of the cases]). The idea is therefore to include \\.t2d
in the
above list of files being removed on C-c C-c Clean
. However, if I do so, C-c
C-c Clean
says TeX-clean: Removing old name: is a directory: qrm.t2d
. How can
directories be removed on C-c C-c Clean
?