[Top][All Lists]

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

Re: Indexed search with grep-like output

From: Lennart Borgman
Subject: Re: Indexed search with grep-like output
Date: Tue, 4 Jan 2011 08:22:09 +0100

On Tue, Jan 4, 2011 at 8:09 AM, Eli Zaretskii <address@hidden> wrote:
>> 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.

No, you do not have that file if you used the installer and installed
the binary version. If you want to use that installer you can not
change the how files with different extensions are parsed by docindex.

> 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.

It does not give an index of the kind you want, that is correct.
However I might still find it handy to quickly find parts of the code.

> 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.

I did not look into ID-utils, but perhaps it can use other programs to
extract the id:s? In that case it could use Emacs.

If you want to then feel free to add support for ID-utils to
idxsearch.el. It should typically be a file on its own. The file
idxdocindex.el is a good starting example.

reply via email to

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