"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
Hi Tamas,
>> But the locate source lists always the same files, although none of
>> them matches the given pattern. Those are the listed files, I typed
>> the pattern "foobarbaz".
>
> Works for me. I started emacs with -q, loaded anything, did a (push
> anything-source-locate anything-sources) and anything listed the
> matching files with locate.
Ok, I tried emacs -Q as well, but still I get the same list of files.
> I use the locate source every day, so it should work. :) Maybe you
> should try starting the locate process manually with start-process to
> see if it returns the correct results.
Nope.
> Someone else also had a problem with the locate source and it turned
> out his locate didn't understand the options I used in the example
> anything-locate-source.
Ah, yes, that's it. I use GNU slocate version 3.1. The option -r has to
be followed by the regexp to search, so
locate -r -i foobarbaz
will look for the regexp -i instead of foobarbaz. So the solution is to
reverse -r and -i:
--8<---------------cut here---------------start------------->8---
(defvar anything-source-locate
'((name . "Locate")
(candidates . (lambda ()
(start-process "locate-process" nil
"locate" "-i" "-r"
anything-pattern)))
(type . file)
(requires-pattern . 3))
"Source for retrieving files matching the current input pattern
with locate.")
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
--
"DRM manages rights in the same way a jail manages freedom"
_______________________________________________
gnu-emacs-sources mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources