From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: John's amazing indexing posts Date: Mon, 13 Jul 2015 05:41:22 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51d2b804701ae051abe8692 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEaEo-0005Ki-20 for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 05:41:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEaEm-0005jF-QK for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 05:41:25 -0400 Received: from mail-vn0-x230.google.com ([2607:f8b0:400c:c0f::230]:33177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEaEm-0005iQ-Lp for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 05:41:24 -0400 Received: by vnbf7 with SMTP id f7so32577446vnb.0 for ; Mon, 13 Jul 2015 02:41:22 -0700 (PDT) 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: Org Mode --bcaec51d2b804701ae051abe8692 Content-Type: text/plain; charset=UTF-8 Not sure if everyone has seen John's latest post about indexing org files with swish-e: http://kitchingroup.cheme.cmu.edu/blog/2015/07/06/Indexing-headlines-in-org-files-with-swish-e-with-laser-sharp-results/ It's very impressive. It strikes me as a step towards an incredibly ambitious project that would bring file indexing inside of Emacs -- so it would not longer be necessary to go out to a shell or a Desktop Search tool in order to find files that contain particular search terms. I'm looking forward to your next steps, John! Matt --bcaec51d2b804701ae051abe8692 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Not sure if everyone has seen John's latest = post about indexing org files with swish-e:

http://kitchingroup.cheme.cmu.edu/blog/20= 15/07/06/Indexing-headlines-in-org-files-with-swish-e-with-laser-sharp-resu= lts/

It's very impressive.=C2=A0 It strikes me as a st= ep towards an incredibly ambitious project that would bring file indexing i= nside of Emacs -- so it would not longer be necessary to go out to a shell = or a Desktop Search tool in order to find files that contain particular sea= rch terms.=C2=A0 I'm looking forward to your next steps, John!

<= /div>Matt
--bcaec51d2b804701ae051abe8692-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: John's amazing indexing posts Date: Mon, 13 Jul 2015 10:31:31 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEelf-0003hx-CO for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 10:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEelc-000534-00 for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 10:31:39 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:36855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEelb-00052p-Qt for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 10:31:35 -0400 Received: by qkdv3 with SMTP id v3so59860201qkd.3 for ; Mon, 13 Jul 2015 07:31:33 -0700 (PDT) In-reply-to: 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: Matt Price Cc: Org Mode Thanks Matt, That is also my impression of where this will go. Eventually this will move towards a database search engine, e.g. like Oleg's project at https://github.com/wvxvw/sphinx-mode. I am not sure precisely which direction though. Swish-e is nice, but at the moment you cannot incrementally update the database, and full indexing is required every time. I am not sure that is fixable, and swish-e does not do unicode. There are half a dozen or so candidates to go forward on, and they all have some pros and cons to think about. It has a lot of other applications in org too, e.g. a file-system wide agenda, tag search, etc... Matt Price writes: > Not sure if everyone has seen John's latest post about indexing org files > with swish-e: > > http://kitchingroup.cheme.cmu.edu/blog/2015/07/06/Indexing-headlines-in-org-files-with-swish-e-with-laser-sharp-results/ > > It's very impressive. It strikes me as a step towards an incredibly > ambitious project that would bring file indexing inside of Emacs -- so it > would not longer be necessary to go out to a shell or a Desktop Search tool > in order to find files that contain particular search terms. I'm looking > forward to your next steps, John! > > Matt -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner Subject: Re: John's amazing indexing posts Date: Sun, 26 Jul 2015 22:16:57 -0700 Message-ID: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> References: Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJams-0000et-8C for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 01:17:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJamm-0004PI-2s for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 01:17:18 -0400 Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:35943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJaml-0004Oy-S1 for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 01:17:12 -0400 Received: by pdjr16 with SMTP id r16so46203474pdj.3 for ; Sun, 26 Jul 2015 22:17:10 -0700 (PDT) In-Reply-To: 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: Org Mode Cc: John Kitchin Hi all, I previously hooked up org with recoll with pretty good results. I=E2=80=99= ve written this up for worg, but I have my ssh key on a different machine, so I can=E2=80=99t push now. Here is the info for the record. ** Recoll In order to index using the [[http://www.lesbonscomptes.com/recoll/][recoll= ]] search engine, you will want to add the following to your =3D~/.recoll/mimeinfo=3D file: #+BEGIN_SRC .org =3D text/x-org .org_archive =3D text/x-org #+END_SRC You will also need a shell script to convert your org mode files to HTML in batch mode. The script takes as an argument the file to convert and prints the output to stdout. Here is an example: #+BEGIN_SRC sh #!/bin/sh emacs --batch --eval "(progn (find-file \"$1\") (org-html-export-as-html) (= set-buffer \"*Org HTML Export*\") (princ (buffer-string)))" #+END_SRC You will also need the following in your =3D~/.recoll/mimeconf=3D: #+BEGIN_SRC [index] text/x-org =3D exec /home/egh/.recoll/rclorg ; mimetype =3D text/html #+END_SRC Now, rebuild your recoll index. Org mode files should be converted to HTML and indexed. It will take some time, because emacs will be launched for each conversion. An alternative is to use [[http://pandoc.org]= [pandoc]] to do the conversion. It can be configured as follows in your =3D~/.recoll/mimeconf=3D file: #+BEGIN_SRC [index] text/x-org =3D exec pandoc -s -f org -t html5 ; mimetype =3D text/html #+END_SRC If you want, you might change the pandoc template or org mode output to generate =3Dmeta=3D tags that will be recognized by recoll. See http://www.lesbonscomptes.com/recoll/usermanual/RCL.PROGRAM.html#RCL.PROGRA= M.FILTERS.HTML for details. On Mon, 13 Jul 2015 07:31:31 -0700, John Kitchin wrote: >=20 > Thanks Matt, >=20 > That is also my impression of where this will go. Eventually this will > move towards a database search engine, e.g. like Oleg's project at > https://github.com/wvxvw/sphinx-mode. I am not sure precisely which > direction though. Swish-e is nice, but at the moment you cannot > incrementally update the database, and full indexing is required every > time. I am not sure that is fixable, and swish-e does not do > unicode. There are half a dozen or so candidates to go forward on, and > they all have some pros and cons to think about. >=20 > It has a lot of other applications in org too, e.g. a file-system wide > agenda, tag search, etc... >=20 >=20 > Matt Price writes: >=20 > > Not sure if everyone has seen John's latest post about indexing org fil= es > > with swish-e: > > > > http://kitchingroup.cheme.cmu.edu/blog/2015/07/06/Indexing-headlines-in= -org-files-with-swish-e-with-laser-sharp-results/ > > > > It's very impressive. It strikes me as a step towards an incredibly > > ambitious project that would bring file indexing inside of Emacs -- so = it > > would not longer be necessary to go out to a shell or a Desktop Search = tool > > in order to find files that contain particular search terms. I'm looki= ng > > forward to your next steps, John! > > > > Matt >=20 > -- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu >=20 >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Krehel Subject: Re: John's amazing indexing posts Date: Mon, 27 Jul 2015 15:19:35 +0200 Message-ID: <87egjt3fh4.fsf@gmail.com> References: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJiQg-00042t-Nk for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 09:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJiQb-0003Vd-JN for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 09:26:54 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:37075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJiQb-0003VC-Az for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 09:26:49 -0400 Received: by wibud3 with SMTP id ud3so115875722wib.0 for ; Mon, 27 Jul 2015 06:26:48 -0700 (PDT) In-Reply-To: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> (Erik Hetzner's message of "Sun, 26 Jul 2015 22:16:57 -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 Hi Erik, Erik Hetzner writes: > I previously hooked up org with recoll with pretty good results. > ... > http://www.lesbonscomptes.com/recoll/ Thanks for the link. I tried it, and it actually works great on my system (unlike swish-e). And I did no configuration of mimeinfo, I only told it to index my whole org/ directory. If anyone is interested, I've added an Emacs interface to recallq (a shell tool that comes with recoll that you have to build yourself). See counsel-recoll command from https://github.com/abo-abo/swiper/blob/master/counsel.el. Initially, this command gives you a list of files that match the query. After selecting the file, it's searched for the current query. Unfortunately, the -A (abstract) switch isn't as useful as the context that e.g. grep gives, so I went only with the file names. regards, Oleh From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: John's amazing indexing posts Date: Mon, 27 Jul 2015 10:19:48 -0400 Message-ID: References: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> <87egjt3fh4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJjG1-0008S2-Mo for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 10:19:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJjFv-0003EQ-Uy for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 10:19:57 -0400 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:32962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJjFv-0003E3-Qi for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 10:19:51 -0400 Received: by qged69 with SMTP id d69so52441409qge.0 for ; Mon, 27 Jul 2015 07:19:51 -0700 (PDT) In-reply-to: <87egjt3fh4.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 There is also a helm-recoll package available. I came across recoll a few weeks ago when I saw that package! It also basically worked as advertised and I am just looking forward to some free time to figure out how to get the super focused search I worked out for swish-e. Has anyone tried using emacsclient for the html export? Maybe that would speed up indexing if a whole new emacs isn't spun up each time. Oleh Krehel writes: > Hi Erik, > > Erik Hetzner writes: >> I previously hooked up org with recoll with pretty good results. >> ... >> http://www.lesbonscomptes.com/recoll/ > > Thanks for the link. I tried it, and it actually works great on my > system (unlike swish-e). And I did no configuration of mimeinfo, I only > told it to index my whole org/ directory. > > If anyone is interested, I've added an Emacs interface to recallq (a > shell tool that comes with recoll that you have to build yourself). See > counsel-recoll command from > https://github.com/abo-abo/swiper/blob/master/counsel.el. > > Initially, this command gives you a list of files that match the > query. After selecting the file, it's searched for the current query. > Unfortunately, the -A (abstract) switch isn't as useful as the context > that e.g. grep gives, so I went only with the file names. > > regards, > Oleh -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner Subject: Re: John's amazing indexing posts Date: Mon, 27 Jul 2015 09:40:25 -0700 Message-ID: <55b65efa.c765460a.f3aa8.1380@mx.google.com> References: <55b5bed5.4731460a.680f0.ffffb455@mx.google.com> <87egjt3fh4.fsf@gmail.com> Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJlS4-00028q-4w for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:40:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJlS0-0006Od-OP for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:40:32 -0400 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:34586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJlS0-0006OX-Hf for emacs-orgmode@gnu.org; Mon, 27 Jul 2015 12:40:28 -0400 Received: by pacan13 with SMTP id an13so55179024pac.1 for ; Mon, 27 Jul 2015 09:40:27 -0700 (PDT) In-Reply-To: <87egjt3fh4.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: Org Mode , John Kitchin Hi Oleh, On Mon, 27 Jul 2015 06:19:35 -0700, Oleh Krehel wrote: >=20 >=20 > Hi Erik, >=20 > Erik Hetzner writes: > > I previously hooked up org with recoll with pretty good results. > > ... > > http://www.lesbonscomptes.com/recoll/ >=20 > Thanks for the link. I tried it, and it actually works great on my > system (unlike swish-e). And I did no configuration of mimeinfo, I only > told it to index my whole org/ directory. Of course! I=E2=80=99ve forgotten exactly what I was intending to accomplish by converting to HTML - I believe I was generating citations - but recoll should be able to index plain text without issue. This will probably work better for org files, as well, since you can search the complete content. > If anyone is interested, I've added an Emacs interface to recallq (a > shell tool that comes with recoll that you have to build yourself). See > counsel-recoll command from > https://github.com/abo-abo/swiper/blob/master/counsel.el. >=20 > Initially, this command gives you a list of files that match the > query. After selecting the file, it's searched for the current query. > Unfortunately, the -A (abstract) switch isn't as useful as the context > that e.g. grep gives, so I went only with the file names. This is great, especially for me, as I=E2=80=99ve been using ivy lately. 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. best, Erik -- Sent from my free software system . 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 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Krehel Subject: Re: John's amazing indexing posts Date: Fri, 31 Jul 2015 10:31:01 +0200 Message-ID: <87k2tg20fu.fsf@gmail.com> 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: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL5pl-0004l0-BJ for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 04:38:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZL5pg-0006SX-GC for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 04:38:29 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:35827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL5pg-0006SH-95 for emacs-orgmode@gnu.org; Fri, 31 Jul 2015 04:38:24 -0400 Received: by wibxm9 with SMTP id xm9so23575333wib.0 for ; Fri, 31 Jul 2015 01:38:23 -0700 (PDT) In-Reply-To: (Xebar Saram's message of "Fri, 31 Jul 2015 10:55:01 +0300") 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: Xebar Saram Cc: Erik Hetzner , Org Mode , John Kitchin Hi Xebar, Xebar Saram writes: > 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/ You can't see the search term inline, only the file name. Recoll doesn't support inline context. It has support for abstracts, but they are disjointed, as in not a full sentence, but a summary of keywords. Showing those is a possibility, but at times it's just too much information. For instance, here's one candidate for input 'git': text/plain [file:///home/oleh/Dropbox/org/wiki/git.org] [git.org] 9921 bytes ABSTRACT title my git notes language en ... css articles done http git scm com book en git branching branching workflows git branching workflows closed 2013 ... 22 00 done http git scm com book en distributed git distributed workflows git distributed workflows closed 2013 ... /ABSTRACT I think the file name here is more relevant than the abstract, taking into account that there are 59 other candidates, besides this one. --Oleh