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

Martin Maechler maechler at stat.math.ethz.ch
Wed Jul 6 15:38:47 CEST 2005


Excellent!

yes, it now all works as it should;
Nice idea to use the "help(rlm in packages)[R]" buffer name!
Thank you, Stephen!

Martin

>>>>> "StEgl" == Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>
>>>>>     on Tue, 5 Jul 2005 16:15:24 +0100 writes:

    StEgl> Stephen Eglen writes:
    >> > 
    >> >   > 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.

    StEgl> I just committed some code to ess-help.el to do this.  Please try the
    StEgl> following commands in R to test:

    StEgl> (setq ess-help-kill-bogus-buffers t)

    StEgl> R:
    >> ?contour

    StEgl> [should now be displayed okay; previously was killed as bogus.]

    >> options("help.try.all.packages" = TRUE)
    >> ?rlm

    StEgl> should get a buffer called *help[R](rlm in packages)*

    StEgl> and then if you 
    >> library(MASS)
    >> ?rlm

    StEgl> you should get *help[R](rlm)*

    StEgl> (rlm in packages) does not disappear.

    StEgl> Stephen




More information about the ESS-bugs mailing list