Page 1 of 1

newlisp docs and various editors

Posted: Thu Jun 29, 2006 4:17 pm
by Tim Johnson
While setting up a newlisp editor mode for emacs, I wrote an
application in rebol that parsed newlisp documentation and created
elisp data structures for emacs to use.

I first 'massaged' the documentation, inserting "tags" to provide some
sort of delimiting for the parsing operation.

1)Perhaps a I missed something, so can anyone offer a method to
parse without the 'massaging'?

2)This same method can be modified to provide .txt helpfiles for vim.
If any vim users are interested give me a 'holler'. I used to work
with vim a lot, but it's been a while, so I will need to refresh my
understanding of vim helpfile layouts.

3)Perhaps the same method can be used for other editors, too.

4)For myself, I'm nowhere without documentation and like to
write same for my own libraries. Programming is an "open book test"
for me. :-)

tim

Posted: Thu Jun 29, 2006 4:42 pm
by Lutz
the text web browser: lynx does a good job of formatting newlisp_manual.html for text output. Perhaps the following function can somehow help you:

Code: Select all

(define-macro (help func)
  (if (primitive? (eval func))
        (let (func-name (name func))
                (if (ends-with func-name "?") (replace "?" func-name "p")) 
        (!  (format "lynx /usr/share/newlisp/doc/newlisp_manual.html#%s" func-name)))
    (format "%s is not a built-in function" (name func))))

; try the following

(help list?)
Lutz

Posted: Thu Jun 29, 2006 6:32 pm
by Tim Johnson
Lutz wrote:the text web browser: lynx does a good job of formatting newlisp_manual.html for text output. Perhaps the following function can somehow help you:

Code: Select all

(define-macro (help func)
  (if (primitive? (eval func))
        (let (func-name (name func))
                (if (ends-with func-name "?") (replace "?" func-name "p")) 
        (!  (format "lynx /usr/share/newlisp/doc/newlisp_manual.html#%s" func-name)))
    (format "%s is not a built-in function" (name func))))

; try the following

(help list?)
Lutz
Yes. That may very well be the way to go. It looks like it would work
sort of like the rebol 'help function.
Thanks
tim