auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] How to get rid of intermediate files?


From: Ralf Angeli
Subject: Re: [AUCTeX] How to get rid of intermediate files?
Date: Sat, 04 Feb 2006 16:51:51 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

* René (2006-02-03) writes:

> I would like to be able to compile my latex file and only keep the
> important outputs (i.e., .pdf, .bbl).  I don't want the other files
> (i.e., .aux, .log, .blg, .out, etc.) to clutter my directories.  Is
> there a way to redirect those files to /tmp for instance.

As far as I know this is not possible.  As an alternative you could
invoke a function for cleaning up generated files.  I am occasionally
using this:

(defcustom TeX-clean-extensions
  '("aux" "bbl" "blg" "dvi" "fot" "glo" "gls" "lof" "idx" "ilg" "ind"
    "log" "lot" "pdf" "toc" "url")
  "List of extensions of files to be deleted by `TeX-clean'.")

(defun TeX-clean ()
  "Delete all generated files associated with current master file."
  (interactive)
  (let ((basename (TeX-active-master nil t)))
    (when (y-or-n-p "Delete generated files? ")
      (dolist (ext TeX-clean-extensions)
      (let ((file (concat basename "." ext)))
        (when (file-exists-p file)
            (delete-file file)))))))

I guess I should generalize this, i.e. make it work and configurable
with all AUCTeX modes, and check it in.  Although it is not a truely
external command I'd like it to show up in the Command menu or `C-c
C-c' and friends respectively.

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]