Erik Hetzner <egh@e6h.org> writes:
> I believe that you can rewrite using the recoll tool directly instead
> of recollq, using `recoll -t -b 'search string'`:
>
> (defun counsel-recoll-function (string &optional _pred &rest _unused)
> "Grep in the current directory for STRING."
> (if (< (length string) 3)
> (counsel-more-chars 3)
> (counsel--async-command
> (format "recoll -t -b '%s'" string))
> nil))
>
> If you use `recoll -A -t 'search string'` and do some post processing
> you could get snippets, too. I can’t see how to do that easily with
> counsel--async-command, though.
Thanks, Erik. I've merged your pull request. So now it's very easy to
start using recoll with Emacs - outside of Emacs the only necessary
thing is:
sudo apt-get install recoll
And inside Emacs it's:
package-install counsel
I did look into the annotation switch. The thing is that it just shows
some database aggregates instead of the actual line context, like grep
does. With 30 candidates and no line context, a pure list of files looks
simpler than a list of files and a list of out-of-sequence words that
each file contains.
--Oleh