emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] John's amazing indexing posts


From: Erik Hetzner
Subject: Re: [O] John's amazing indexing posts
Date: Mon, 27 Jul 2015 09:40:25 -0700
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/25.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Oleh,

On Mon, 27 Jul 2015 06:19:35 -0700,
Oleh Krehel <address@hidden> wrote:
> 
> 
> Hi Erik,
> 
> Erik Hetzner <address@hidden> 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.

Of course! I’ve 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.
> 
> 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’ve 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’t see how to do that easily with
counsel--async-command, though.

best, Erik
--
Sent from my free software system <http://fsf.org/>.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]