From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Krehel Subject: Re: John's amazing indexing posts Date: Tue, 28 Jul 2015 10:14:37 +0200 Message-ID: <8761541yxe.fsf@gmail.com> References: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> <87egjt3fh4.fsf@gmail.com> <55b65efa.c765460a.f3aa8.1380@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK096-0003Qf-Hn for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 04:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK093-0002jW-9E for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 04:21:56 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:35302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK093-0002jG-26 for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 04:21:53 -0400 Received: by wibxm9 with SMTP id xm9so145594058wib.0 for ; Tue, 28 Jul 2015 01:21:52 -0700 (PDT) In-Reply-To: <55b65efa.c765460a.f3aa8.1380@mx.google.com> (Erik Hetzner's message of "Mon, 27 Jul 2015 09:40:25 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Hetzner Cc: Org Mode , John Kitchin Erik Hetzner 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=E2=80=99t see how to do that easily wi= th > 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