From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: John's amazing indexing posts Date: Fri, 31 Jul 2015 10:55:01 +0300 Message-ID: References: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> <87egjt3fh4.fsf@gmail.com> <55b65efa.c765460a.f3aa8.1380@mx.google.com> <8761541yxe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0103e8c01de536051c272355 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL59n-0003l5-6D for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 03:55:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZL59j-0002Up-Ci for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 03:55:07 -0400 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:34541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL59j-0002SH-1O for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 03:55:03 -0400 Received: by pdbbh15 with SMTP id bh15so38340647pdb.1 for ; Fri, 31 Jul 2015 00:55:02 -0700 (PDT) In-Reply-To: <8761541yxe.fsf@gmail.com> 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: Oleh Krehel Cc: Erik Hetzner , Org Mode , John Kitchin --089e0103e8c01de536051c272355 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Oleh i start using counsel and the counsel-recoll and is quite good, thx for this! a small Q. when i launch the command am i supposed to see the search term inline (like in grep) or just the file name it resides in. currently i just see the filename that contains the search term. example screenshot: https://paste.xinu.at/B77QYh/ best Z On Tue, Jul 28, 2015 at 11:14 AM, Oleh Krehel wrote: > 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 = 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 > > --089e0103e8c01de536051c272355 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Oleh

i start using counsel and the c= ounsel-recoll and is quite good, thx for this!
a small Q. when i = launch the command am i supposed to see the search term inline (like in gre= p) or just the file name it resides in. currently i just see the filename t= hat contains the search term. example screenshot:
=
best

Z

On Tue, Jul 28, 2015 at 11:14 = AM, Oleh Krehel <ohwoeowho@gmail.com> wrote:
Erik Hetzner <egh@e6h.org> writes:

> I believe that you can rewrite using the recoll tool directly instead<= br> > of recollq, using `recoll -t -b 'search string'`:
>
> (defun counsel-recoll-function (string &optional _pred &rest _= unused)
>=C2=A0 =C2=A0"Grep in the current directory for STRING."
>=C2=A0 =C2=A0(if (< (length string) 3)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(counsel-more-chars 3)
>=C2=A0 =C2=A0 =C2=A0(counsel--async-command
>=C2=A0 =C2=A0 =C2=A0 (format "recoll -t -b '%s'" stri= ng))
>=C2=A0 =C2=A0 =C2=A0nil))
>
> If you use `recoll -A -t 'search string'` and do some post pro= cessing
> you could get snippets, too. I can=E2=80=99t see how to do that easily= with
> counsel--async-command, though.

Thanks, Erik. I've merged your pull request. So now it's ver= y easy to
start using recoll with Emacs - outside of Emacs the only necessary
thing is:

=C2=A0 =C2=A0 sudo apt-get install recoll

And inside Emacs it's:

=C2=A0 =C2=A0 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


--089e0103e8c01de536051c272355--