[Top][All Lists]

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

Re: CVS directories in completion-ignored-extensions

From: Miles Bader
Subject: Re: CVS directories in completion-ignored-extensions
Date: 05 Jan 2004 08:59:58 +0900

Stefan Monnier <address@hidden> writes:
> So instead of completion-ignored-names I'd suggest completion-ignored-regexp
> (or completion-ignored-regexps if people feel like having a list of regexps
> instead of a single one is worth the trouble).

I've always thought it would be nice, instead of having multiple variables
each of which contain a different types of entry, to have something like
`completion-ignored-names', where each element could be either: a string
(which is matched using just `equal'), or a list like (regexp REGEXP),
which the matcher would treat accordingly.

So for CVS, we'd just add "CVS/" to the list, but you could also add
(regexp "#.*") to ignore backup files.

This sort of situation happens often in emacs, so we've ended up with many
sets of related variables, FOO-ignored-buffers, FOO-ignored-regexps,
etc.).  I think having separate variables which do almost the same thing
is more confusing that having a single variable in which the elements of
the list can have various meanings, as long as the notation used for
indicating the meaning of each element is sufficiently clear -- and I
think "STRING" => exact match, (regexp "REGEXP") => regexp match, etc.,
meets that criterion.  The actual mechanics of the matching could probably
be done by a single common function, so it need not be an implementation

[BTW, even in the case of a regexp-only variable, it's a lot nicer for the
user to be able to add elements to a list than to add to a regexp...]

Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia

reply via email to

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