[ESS-bugs] ess-mode 5.2.7; cannot get help for contour()

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Mon Jul 4 16:17:09 CEST 2005


 > 
 >   > options("help.try.all.packages" = TRUE)
 >   > ?rlm
 > 
 > you get an  *help[R](rlm)*  buffer with the content
 > 
 > ------------------------------------------------------------------------------
 >   Help for topic 'rlm' is not in any loaded package but can be found in the
 >   following packages:
 > 
 >     Package               Library
 >     MASS                  /u/maechler/R/D/r-devel/64-linux-inst/library
 > ------------------------------------------------------------------------------
 > 
 > Now if the user consequently loads MASS :
 > 
 >     > library(MASS)
 > 
 > and types
 > 
 >     > ?rlm
 > 
 > again, I would have wanted that  the previous *help[R](rlm)*
 > buffer was considered  'bogous' and hence a new buffer would be
 > written with the correct content  {the real help on rlm() in MASS}.

Thanks.  Now I see the problem.  

One solution might be for the lisp to parse the help buffer; if it
begins with 

 Help for topic '...' is not in any loaded package but can be found in the
 following packages:

then we can rename the buffer, e.g. to *help[R](rlm in packages)*

so that presumably if MASS is then loaded, a call to "?rlm" will then
create the new buffer *help[R](rlm)* rather than try to re-use the old
one (since the old one will have a different name).

Going back to the code:

    StEgl> ;; search in first nr-first (default 120) chars only
    StEgl> (and nil (if (not nr-first) (setq nr-first 120)))

should we put that check back in so that regular help files are not
labelled as bogus just for having the text "no documention" in them
after the first couple of lines?

If the above sounds sensible, I'll add some test code.

Stephen




More information about the ESS-bugs mailing list