From: Lennart Borgman <lennart.borgman@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: srackham@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Indexed search with grep-like output
Date: Tue, 4 Jan 2011 09:39:28 +0100 [thread overview]
Message-ID: <AANLkTinMcMemTY9zXeijVRdBc8qXCxAS+WYUo4K5yD_c@mail.gmail.com> (raw)
In-Reply-To: <E1Pa1z0-0000RQ-CE@fencepost.gnu.org>
On Tue, Jan 4, 2011 at 9:11 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Tue, 4 Jan 2011 08:22:09 +0100
>> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org, srackham@gmail.com
>>
>> > 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.
>
> Well, I certainly did use the installer, and I do have that file. Are
> you sure you don't have it?
Yes, and I just told what Stuart told me.
> In any case, you can find it in the docindexer source distribution.
>
>> If you want to use that installer you can not
>> change the how files with different extensions are parsed by docindex.
>
> But I just did change that. Here's the exact recipe:
>
> . Find config.py in the docindexer installation directory and edit it
> to add a line for *.el files.
> . Find a file named library.zip in the docindexer installation
> directory. This is the class library used by docindexer.
> . Replace the file docindexer/config.pyc in library.zip with the
> edited docindexer/config.py. Note: the .pyc extension means that
> the file was compiled by Python; the corresponding .py file is not
> compiled, but it will be used anyway -- this is similar to what
> Emacs does with *.el and *.elc files.
> . Run "docindexer --config" and make sure you see the *.el line in
> the output.
Hm. Nice.
> After performing the above procedure, I have just indexed the entire
> Emacs lisp/ directory. It took 3 minutes (yes, the indexer is not
> very fast, which is why it's scheduled to run at night when I'm away;
> mkid does the same job 3 times faster).
>
> Morale: Never underestimate the power of Free Software! When you have
> sources, _you_ are in control, not the software developer. This is
> what Free Software is all about.
It is nice, but normally you do not want to go through trouble just to
use a new bit of software. You might rightly suspect that it is a
waste of time to do that in many cases.
>> > 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.
>
> Is it really handy? Lisp identifiers include punctuation characters
> such as `-', `>', `:', etc. I'd guess that plain text indexing will
> not index these identifiers as you'd want to.
It is a good point, I do not know. But I wrote this mainly for
org-mode files and thought it could be used for code too for quickly
finding something.
I still think it can - if I change one little thing: If the line
matcher uses AND it would be much better.
>> 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.
>
> I'd rather extend id-utils.el, and eventually add that to Emacs.
Well, it might be good they stay separate.
Another way to handle it might be to use the parsers from ID-utils and
feed a regular search engine. Though you might perhaps then still have
trouble with the query language. (Which of course can be solved in
free software...)
next prev parent reply other threads:[~2011-01-04 8:39 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-01 19:24 Indexed search with grep-like output Lennart Borgman
2011-01-01 20:51 ` Eli Zaretskii
2011-01-01 21:15 ` Lennart Borgman
2011-01-01 22:06 ` Eli Zaretskii
2011-01-01 22:31 ` Lennart Borgman
2011-01-01 23:03 ` Lennart Borgman
2011-01-02 4:07 ` Eli Zaretskii
2011-01-02 4:12 ` Lennart Borgman
2011-01-02 8:23 ` Thierry Volpiatto
2011-01-02 11:18 ` Eli Zaretskii
2011-01-02 11:40 ` Lennart Borgman
2011-01-02 13:31 ` Eli Zaretskii
2011-01-02 13:46 ` Lennart Borgman
2011-01-02 13:53 ` Eli Zaretskii
2011-01-02 14:15 ` Lennart Borgman
2011-01-02 15:51 ` Eli Zaretskii
2011-01-03 3:38 ` Lennart Borgman
2011-01-03 4:10 ` Stefan Monnier
2011-01-03 4:14 ` Lennart Borgman
2011-01-03 9:31 ` Dimitri Fontaine
2011-01-03 15:04 ` Lennart Borgman
2011-01-03 17:49 ` Eli Zaretskii
2011-01-03 18:46 ` Tassilo Horn
2011-01-03 18:56 ` Lennart Borgman
2011-01-03 13:02 ` Eli Zaretskii
2011-01-03 15:05 ` Lennart Borgman
2011-01-03 17:53 ` Eli Zaretskii
2011-01-03 18:33 ` Lennart Borgman
2011-01-04 3:21 ` Lennart Borgman
2011-01-04 6:30 ` Lennart Borgman
2011-01-04 7:09 ` Eli Zaretskii
2011-01-04 7:22 ` Lennart Borgman
2011-01-04 8:11 ` Eli Zaretskii
2011-01-04 8:39 ` Lennart Borgman [this message]
2011-01-05 21:43 ` Stefan Monnier
2011-01-05 21:47 ` Eli Zaretskii
2011-01-06 0:15 ` Stefan Monnier
2011-01-10 10:22 ` Lennart Borgman
2011-01-10 18:33 ` Eli Zaretskii
2011-01-11 11:33 ` Lennart Borgman
2011-03-14 0:14 ` Lennart Borgman
2011-03-14 11:30 ` Eli Zaretskii
2011-03-14 11:51 ` Lennart Borgman
2011-01-03 5:40 ` Daniel Colascione
2011-01-03 6:14 ` Stefan Monnier
2011-01-03 15:09 ` Lennart Borgman
2011-01-03 17:41 ` Eli Zaretskii
2011-01-03 17:44 ` Lennart Borgman
2011-01-03 18:22 ` Eli Zaretskii
2011-03-18 0:34 ` Lennart Borgman
2011-03-18 2:32 ` Stefan Monnier
2011-03-18 10:55 ` Lennart Borgman
2011-03-18 13:12 ` Ted Zlatanov
2011-03-18 17:45 ` Stefan Monnier
2011-03-19 20:52 ` Chong Yidong
2011-03-19 22:58 ` Lennart Borgman
2011-03-20 8:05 ` Jambunathan K
2011-03-24 18:24 ` Chong Yidong
2011-04-27 10:28 ` Lennart Borgman
2011-04-27 10:38 ` Lennart Borgman
2011-04-27 10:49 ` Lennart Borgman
2011-04-27 11:12 ` Lennart Borgman
2011-04-29 9:55 ` Lennart Borgman
2011-04-29 16:10 ` Stefan Monnier
2011-04-29 16:15 ` Lennart Borgman
2011-01-02 2:09 ` Stefan Monnier
2011-01-02 2:22 ` Lennart Borgman
2011-01-02 2:59 ` Stefan Monnier
2011-01-02 3:13 ` Lennart Borgman
2011-01-02 3:51 ` Stefan Monnier
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinMcMemTY9zXeijVRdBc8qXCxAS+WYUo4K5yD_c@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=srackham@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.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).