gnu-emacs-sources
[Top][All Lists]
Advanced

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

Re: ;;; anything.el --- open anything


From: billclem
Subject: Re: ;;; anything.el --- open anything
Date: Mon, 30 Jul 2007 19:45:06 -0000
User-agent: G2/1.0

Hi Tamas/Tassilo,

Tassilo Horn <address@hidden> writes:

> address@hidden writes:
>
> Hi Bill,
>
>> (defvar anything-locate-options (if (eq system-type 'darwin)
>>                                  '("locate")
>>                                '("locate" "-i " "-r"))
>>   "A list where the `car' is the name of the locat program
>> followed by options. The search pattern will be appended, so the
>> \"-r\" option should be the last option.")
>
> Added.

It might be useful to add some sort of output filtering to commands as
well. At the moment, anything-buffer-list (in anything.el) does some
basic buffer name filtering. However, this would be useful for most
commands. For example, I have a custom bc-locate command setup that
does:

locate $@ | egrep -v "/Applications/cache/|/.backups|/.svn|/
CVS|/.DS_Store|/.cvsignore"

because I want to exclude certain files & directories from the results
that are displayed by anything when it does a "locate" type of
search. At the moment, to do that, I do:

(setq anything-locate-options '("bc-locate"))

The same criteria would apply for mdfind. The same criteria would
apply for "Files from the Current Directory". There might be other
criteria that I would like to apply to other commands. So, the most
logical place to have the exclusions handling code is probably in
anything.el rather than anything-config.el (although the actual
variables and/or functions to be used for specific exclusions would
probably be in anything-config.el).

I initially thought that the new "match" attribute for
anything-sources could probably be used for both matches and
exclusions; however, it would probably be difficult to use it for the
"external" commands like locate & mdfind. It might be better to have
the exclusions done at a "lower" level (e.g. - somewhere like
anything-insert-match) so that the exclusions are done only once a
candidate is ready to be put into the anything buffer.

Thoughts?

--
Bill Clementson



reply via email to

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