[Top][All Lists]

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

[AUCTeX-devel] Re: Cleaning functionality

From: Reiner Steib
Subject: [AUCTeX-devel] Re: Cleaning functionality
Date: Mon, 06 Feb 2006 11:05:56 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On Mon, Feb 06 2006, Ralf Angeli wrote:

> * Reiner Steib (2006-02-05) writes:
>> On Sun, Feb 05 2006, Ralf Angeli wrote:
>>> The resulting customization options may not be easily
>>> understandable by users not familiar with regular expressions.
>>> Consequently we could provide the option to use a list of suffixes
>>> instead of a regular expression and use such a list in the "easy"
>>> cases like (La)TeX and ConTeXt modes as default.
>> A compromise might be to use a list of regexps.
> Hm, not a bad option.  My concerns are that you will have to write a
> lot of "\."'s for the extension delimiters and "\'"'s for matching
> their ends.  And if you fail to do that correctly, mismatches will
> happen which would be rather fatal when it comes to deleting files.

We could prepend «\.» and append «\'» automatically unless the entry
starts with «\.» (and «-» or «_» for ConTeXt or texinfo).  It might
sound like too much DWIM, but if it's explicitly documented and the
user already can see examples, it should be okay.

> In any case I am thinking about optionally opening a window which
> displays the files to be deleted so that the user can check if there
> is anything she wants to keep.

Maybe a variable `TeX-confirm-clean' with values like nil (don't ask),
t (ask for every file) and 'once (ask only once for each call of
TeX-clean; maybe combined a listing of the files) should be added.

> Additionally (not so much related to the above) I changed `TeX-clean'
> in a way that it will delete intermediate files if being called
> without argument and both intermediate and output files if being
> called with a prefix argument.  Consequently, in `TeX-command-list'
> there will be both a "Clean" and a "Clean All" entry.

Good idea.

>> Or use `custom-split-regexp-maybe' (like in `gnus-visible-headers').
> But this will only work for very simple regexps without grouping.

Yes, but it would be possible to rewrite the regexp in a way that it
works.  :-)

> ELISP> (custom-split-regexp-maybe "\\.\\(foo\\|bar\\)")
> ("\\.\\(foo" "bar\\)")

Probably `custom-split-regexp-maybe' should better signal an error in
such a case.

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |

reply via email to

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