octave-maintainers
[Top][All Lists]
Advanced

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

Re: Kind of a lookfor function (moved from help list)


From: John W. Eaton
Subject: Re: Kind of a lookfor function (moved from help list)
Date: Tue, 20 Sep 2005 01:26:01 -0400

On 20-Jun-2005, David Bateman wrote:

| Ok, I worked my last version of this code up as a patch against the CVS, 
| attached. John do you want this, with the understanding that finding the 
| first sentence in an arbitrary help string is not guarenteed, though the 
| code I have works 100% on the core octave functions and almost 100% on 
| the octave-forge stuff. The same algorithm is used in make_index to 
| build the category index on octave-forge.
| 
| Cheers
| David
| 
| 2005-06-20  David Bateman  <address@hidden>
| 
|     * help.cc (std::string first_help_sentence): New function to find
|     first sentence in help string.
|     (std::string pad (const std:string &, const size_t): New
|     function to pad string to a certain length.
|     (void print_lookfor (const std::string &, const std::strig &):
|     Nnew function to print help string in a formatted manner.
|     (Flookfor): Lookfor function.

Just to let people on the list know, I merged a version of this
patch.

It seems a little slow, probably because it has to open every .m file
in the LOADPATH, then parse the help.  This will happen each time the
function is evaluated as there is no caching.  Maybe we should
consider (at some future time) installing the DOCSTRINGS file(s) and
searching there instead?

jwe



reply via email to

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