Re: [Rd] *.Rd file: space after topic in "\alias{topic }" should be (PR#9915)

From: <bill_at_insightful.com>
Date: Mon, 17 Sep 2007 19:56:05 +0200 (CEST)


On Mon, 17 Sep 2007 bill_at_insightful.com wrote:

> Full_Name: Bill Dunlap
> Version: R version 2.6.0 Under development (unstable) (2007-07-26 r42329)
> OS: Linux
> Submission from: (NULL) (24.16.101.199)
>
> If a *.Rd file has an \alias{topic } with a space
> between 'topic' and the closing '}' then the space
> is copied to the help/AnIndex file and help(topic)
> fails to find the help file.
>
> E.g., if the help file starts with
> \name{test1}
> \alias{test1 }
> \alias{test2}
> \alias{test3 }
> \alias{test4}
> then help(test1) and help(test4) work, but not
> help(test1) or help(test3).
>
> A possible fix is
> --- share/perl/R/Rdlists.pm (revision 42846)
> +++ share/perl/R/Rdlists.pm (working copy)
> @@ -329,7 +329,7 @@
> $main::title2file{$rdtitle} = $manfilebase;
> }
>
> - while($text =~ s/\\alias\{\s*(.*)\s*\}//){
> + while($text =~ s/\\alias\{\s*([^\s]*)\s*\}//){
> $alias = $1;
> $alias =~ s/\\%/%/g;
> if ($internal){

It looks like internal spaces are used in \alias entries, e.g.,
  ./R.utils/man/Non-documented_objects.Rd:\alias{Non-documented objects}   ./SparseM/man/character-null-class.Rd:\alias{character or NULL-class} I think the trailing spaces are intended to be ignored, so a better fix would be


Bill Dunlap
Insightful Corporation
bill at insightful dot com
360-428-8146

 "All statements in this message represent the opinions of the author and do  not necessarily reflect Insightful Corporation policy or position."



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 17 Sep 2007 - 17:59:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Sep 2007 - 16:41:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.