newlisp docs and various editors

Notices and updates
Locked
Tim Johnson
Posts: 253
Joined: Thu Oct 07, 2004 7:21 pm
Location: Palmer Alaska USA

newlisp docs and various editors

Post 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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Tim Johnson
Posts: 253
Joined: Thu Oct 07, 2004 7:21 pm
Location: Palmer Alaska USA

Post 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

Locked