[Rd] Front ends handling help.search() results?
Duncan Murdoch
murdoch.duncan at gmail.com
Sat Jul 30 17:51:57 CEST 2011
On 11-07-30 4:40 AM, Thomas Friedrichsmeier wrote:
> On Friday 29 July 2011, Duncan Murdoch wrote:
>> Which front ends process the help.search() results to produce nice
>> clickable lists, instead of the simple text display that's the default?
>> I know the R.app gui on Mac OS does; are there others?
>
> RKWard does, too. (More precisely: It has a UI for searching help files, which
> relies on help.search()).
>
>> I'm asking because one of the decisions made when R Core met in Vienna
>> was to allow vignettes to be returned as results of help.search(). All
>> of those front ends will need to be able to handle this.
>
> Will this affect the structure of the hsearch class?
>
> Currently, our implementation for showing an item from the result list is to
> simply call help(help_type="html"), appropriately. What are the implications
> of vignettes for the behavior of help(), if any (with or without specification
> of help_type)?
>
Yes, there will be additional components added to it. You can mostly
ignore them, but not completely:
I will add an additional column named "Type" to the "matches" component
of the help.search() results. It will contain "help" for results that
are man pages, "vignette" for results that are vignettes, and "demo" for
results that are demos. The quick fix is to just ignore any results
other than "help" results; then you'll get the same display as before.
I will also add components to the result corresponding to arguments
passed to help.search: "agrep", "ignore.case", "package", "lib.loc",
and "types". (The last of these is a character vector saying which
types of documentation were requested, i.e. some combination of "help",
"vignette", "demo".) These can be ignored, or used to regenerate the
same results as the original. (The dynamic help system regenerates
results for display.)
I have not committed this code yet, because the new types of entries
could mess up existing front ends and I wanted to give people some
warning. I expect I'll commit (to R-devel only) within a day or two.
Duncan Murdoch
More information about the R-devel
mailing list