[Top][All Lists]

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

Re: Indexed search with grep-like output

From: Eli Zaretskii
Subject: Re: Indexed search with grep-like output
Date: Tue, 04 Jan 2011 02:09:04 -0500

> From: Lennart Borgman <address@hidden>
> Date: Tue, 4 Jan 2011 04:21:22 +0100
> Cc: Eli Zaretskii <address@hidden>, Emacs-Devel devel <address@hidden>, 
>       Stuart Rackham <address@hidden>
> It works nicely for what it does. However unfortunately it is still
> unusable since the binary version of docindexer currently does not let
> you tell which files extensions it should index as text.

In the directory where you installed docindexer, there's a file named
conf.py, a piece of Python code that describes the docindexer parser
configuration.  Its syntax should be self-explanatory; you can add
entries there for whatever source files you'd like to index.

Having said that, I don't think docindexer is the right tool for
indexing program source files.  Lucene text analyzers are biased
towards indexing plain text, so they typically ignore one-letter
words, like "a" and "i", words like "the", "in", "on", "some", etc. --
which could well be valid identifiers in a program.  It really isn't
the tool for this job.

For indexing source code, ID-utils is what you want; it doesn't
currently have an ELisp parser, but if you are willing to index *.el
files as plain text, you can tweak the id-util.map file to tell mkid
to treat *.el files as text (a plain text _is_ included in ID-utils).
If that's not good enough, writing an ELisp parser should be hard.

reply via email to

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