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: Sun, 26 Jul 2015 22:16:57 -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 all,

I previously hooked up org with recoll with pretty good results. I’ve
written this up for worg, but I have my ssh key on a different
machine, so I can’t 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 =~/.recoll/mimeinfo= file:

#+BEGIN_SRC
.org  = text/x-org
.org_archive  = 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 =~/.recoll/mimeconf=:

#+BEGIN_SRC
[index]
text/x-org = exec /home/egh/.recoll/rclorg ;
  mimetype = 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
=~/.recoll/mimeconf= file:

#+BEGIN_SRC
[index]
text/x-org = exec pandoc -s -f org -t html5 ;
  mimetype = text/html
#+END_SRC

If you want, you might change the pandoc template or org mode output
to generate =meta= tags that will be recognized by recoll. See
http://www.lesbonscomptes.com/recoll/usermanual/RCL.PROGRAM.html#RCL.PROGRAM.FILTERS.HTML
for details.

On Mon, 13 Jul 2015 07:31:31 -0700,
John Kitchin <address@hidden> wrote:
> 
> 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
> 
> 



reply via email to

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