auctex
[Top][All Lists]
Advanced

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

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


From: David Kastrup
Subject: Re: [AUCTeX] Re: How to get rid of intermediate files?
Date: Sun, 05 Feb 2006 13:40:37 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

marcuirl <address@hidden> writes:

> Ralf Angeli <address@hidden> writes:
>
>> * 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.
>
> Can I make a vote for this feature! I use this in my .emacs.auctex
> file
>
>   (add-to-list 
>                'TeX-command-list 
>                '("purge" 
>                  "rm %s.log %s.aux %s.out %s.exa %s.ilg 
>                      %s.idx %s.ind %s.lof %s.lot %s.toc 
>                      %s.bbl %s.blg %s.rel %s.end
>                      %s.dvi" TeX-run-command nil))
>
> Which I use after the final version of a document (*.pdf or *.ps) is
> generated! Your version seems a little more elegant!

I don't think it is a good idea to remove files with uncertain origin.
Like removing a .ind file if you don't have a .idx file, a .pdf file
not being output of the document (pdf files can be used by
\includegraphics) and a few other things.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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