Combining ESS, R and w3m to search for help

david.whiting at ncl.ac.uk david.whiting at ncl.ac.uk
Thu Apr 3 18:33:36 CEST 2003


Hi,

I have written an emacs function, ess-R-help-me, that integrates R and
a text-based browser called w3m (using emacs-w3m and of course ESS).
My original aim was to link with an R function I wrote that creates a
simple web-page from the output of help.search() to make it easier to
search for help.  


At the moment it provides the following features:

M-x ess-R-help-me creates a prompt in the minibuffer that asks for a
word to search for.

o   If the search phrase is R (the default) a browser buffer is opened
at /usr/local/lib/R/doc/html/index.html (the installed R help webpages
in my installation).

o   If the search phrase is FAQ the FAQ is opened

o   If the search phrase is PACKAGES and the computer is connected to the
internet, then a buffer linking to the list of R packages is opened.

o   If the search phrase is CRAN and the computer is connected to the
internet, then a buffer linking to the CRAN.

o   If any other word is entered it is used by help.search() to search
the installed help files and presents a simple linked summary.

o   Planned: If the search phrase is ARCHIVE and the computer is
connected to the internet, then a buffer linking to the R Archive
search facility provided by Robert King will be opened.  I should be
able to include the search expression directly.


I am new to elisp (I only started on this a week ago) and would
welcome feedback.  I have created a very simple webpage with INSTALL
instructions, a README, source code and some pictures of what it looks
like at the following url:

www.ncl.ac.uk/rw3m

Please note that this is a temporary url and it will be moved to
www.staff.ncl.ac.uk/david.whiting in the near future.  


I have also started work on a function, ess-sweave-and-display, which
takes a sweave source file (.Rnw), use latex2html to convert it to
html and then displays it in w3m within emacs.  It already works, but
the code is still a bit too nasty to show at the moment.  I need to
read more about elisp to learn how to do a few more things before I
put it out there.

I have been doing all this with with emacs in linux.  I have just
tried with xemacs and get an error:

Symbol's function definition is void: register-ccl-program

when trying to run w3m which I need to find out about and resolve, so
I cannot confirm if this will work on xemacs.  If others can get it to
run on xemacs I would be interested to hear about it.

So, as I said, I'd appreciate feedback (on coding style, whether this
is a futile exercise, etc.).

Bye for now.

Dave



-- 
David Whiting
Adult Morbidity and Mortality Project (AMMP)
PO Box 65243, Aga Khan Foundation Building - Ground Floor
Plot No 344 Urambo Street, Upanga, Dar es Salaam, Tanzania.

Tel: +255 22 2153388, Fax: +255 22 2153385
AMMP website: www.ncl.ac.uk/ammp

Against MS attachments. Why? See for example:
http://www.goldmark.org/netrants/no-word/attach.html
http://linuxtoday.com/news_story.php3?ltsn=2002-01-11-002-20-OP



More information about the ESS-help mailing list