emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>, John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: John's amazing indexing posts
Date: Mon, 27 Jul 2015 09:40:25 -0700	[thread overview]
Message-ID: <55b65efa.c765460a.f3aa8.1380@mx.google.com> (raw)
In-Reply-To: <87egjt3fh4.fsf@gmail.com>

Hi Oleh,

On Mon, 27 Jul 2015 06:19:35 -0700,
Oleh Krehel <ohwoeowho@gmail.com> wrote:
> 
> 
> Hi Erik,
> 
> Erik Hetzner <egh@e6h.org> 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/>.

  parent reply	other threads:[~2015-07-27 16:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  9:41 John's amazing indexing posts Matt Price
2015-07-13 14:31 ` John Kitchin
2015-07-27  5:16   ` Erik Hetzner
2015-07-27 13:19     ` Oleh Krehel
2015-07-27 14:19       ` John Kitchin
2015-07-27 16:40       ` Erik Hetzner [this message]
2015-07-28  8:14         ` Oleh Krehel
2015-07-31  7:55           ` Xebar Saram
2015-07-31  8:31             ` Oleh Krehel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55b65efa.c765460a.f3aa8.1380@mx.google.com \
    --to=egh@e6h.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=ohwoeowho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).