On 2/10/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> ? foo describes exactly the command or variable or ... foo
> ? foo* should list/describe all commands that begin with foo
> ? *foo* should list/describe all commands that include foo in the name
When I was working on the describe code a few months ago,
I considered that. I dropped that idea for two reasons.
(1) Some Maxima operators can be regex operators as well,
and I didn't want to introduce escaping or quoting.
(2) I'm not convinced that regex searches are needed anyway.
Substring searches seem to work fine.
Carrying out the implementation of regex searches would be
trivial -- just cut out the existing function REGEX-SANITIZE in
src/cl-info.lisp which quotes any regex operators in the search string.
(describe eventually calls regex functions to carry out exact or
inexact string searches.)
> I don't know how this stuff works in the current versions, but it should
> also be possible to put, in a batch file or a loadable file
>
> foo(x):= ......
>
> describe(foo): "A piece of text that describes the newly defined name foo."
Something like that could be implemented in a straightforward way
by writing some code to wedge new key/value pairs into the hash table
which maps function & variable names to their descriptions.
However, (1) I really, really, really don't want to reimplement Texinfo
or any other formatting tool, so you'd have to be content with
essentially unformatted text, and (2) any text appearing
someplace other than a .texi file won't show up in the html,
pdf, or info files, short of modifying makeinfo to read &
process .mac files as well.
> Perhaps this is too much to ask of a system that is patched together
> using awk, python, Microsoft "help" files, etc.
You're welcome to continue trolling in this vein if you wish.
It's entertaining, although it tends to hold back useful work.
> If the help system were entirely incorporated in the lisp world view, this
> would be easier, though of course it would also require that the lisp system
> pop up windows and menus and similar stuff. (This is all possible in some
> lisp systems, but perhaps not all.)
There are two issues here -- one is the documentation parsing
and the other is display. About parsing the documentation, I'm
not opposed to having it all in Lisp. It's a low priority item to me,
but if you want to work on converting the existing Perl script to
Lisp, you're more than welcome.
About display, I'm not opposed to a Lisp-only display, although
the existing text-only display has to be an option. Maybe
someone has already created a pure Lisp display for texinfo.
Something to consider -- the Microsoft help viewer looks really
nice. It would be painful to give that up, even for the sake of
a cross-platform help viewer.
Robert