Please consider adding the following to the next R release (I understand that it's too late for R-2.1.0). It adds the menu item `Search R Site' in the `Help' menu in Rgui (which calls RSiteSearch() on the input string). Best, Andy --- R-beta/src/gnuwin32/rui.c 2005-03-06 09:41:40.000000000 -0500 +++ R-beta-new/src/gnuwin32/rui.c 2005-04-12 08:21:55.001824500 -0400 @@ -65,7 +65,8 @@ static menuitem msource, mdisplay, mload, msave, mloadhistory, msavehistory, mpaste, mpastecmds, mcopy, mcopypaste, mlazy, mconfig, mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata, - mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, + mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, + msearchRsite, mFAQ, mrwFAQ, mpkgl, mpkgm, mpkgi, mpkgil, mpkgu, /*mpkgb, mpkgbu,*/ mde, mCRAN, mrepos; static int lmanintro, lmanref, lmandata, lmanlang, lmanext, lmanadmin; @@ -485,6 +486,21 @@ } } +static void menusearchRsite(control m) +{ + char *s; + static char olds[256] = ""; + + if (!ConsoleAcceptCmd) return; + s = askstring(G_("Search R Site"), olds); + if (s && strlen(s)) { + snprintf(cmd, 1024, "RSiteSearch(\"%s\")", s); + if (strlen(s) > 255) s[255] = '\0'; + strcpy(olds, s); + consolecmd(RConsole, cmd); + } +} + static void menuapropos(control m) { char *s; @@ -560,6 +576,7 @@ enable(msearch); enable(mhelp); enable(mhelpsearch); + enable(msearchRsite); enable(mapropos); enable(mpkgl); enable(mpkgm); @@ -579,6 +596,7 @@ disable(msearch); disable(mhelp); disable(mhelpsearch); + disable(msearchRsite); disable(mapropos); disable(mpkgl); disable(mpkgm); @@ -985,6 +1003,7 @@ MCHECK(mhelpstart = newmenuitem(G_("Html help"), 0, menuhelpstart)); if (!check_doc_file("doc\\html\\rwin.html")) disable(mhelpstart); MCHECK(mhelpsearch = newmenuitem(G_("Search help..."), 0, menuhelpsearch)); + MCHECK(msearchRsite = newmenuitem(G_("Search R Site..."), 0, menusearchRsite)); MCHECK(newmenuitem("-", 0, NULL)); MCHECK(mapropos = newmenuitem(G_("Apropos..."), 0, menuapropos)); MCHECK(newmenuitem("-", 0, NULL));
Prof Brian Ripley
2005-Apr-12 19:09 UTC
[Rd] patch to add a menu item in Rgui for RSiteSearch
On Tue, 12 Apr 2005, Liaw, Andy wrote:> Please consider adding the following to the next R release (I understand > that it's too late for R-2.1.0). It adds the menu item `Search R Site' in > the `Help' menu in Rgui (which calls RSiteSearch() on the input string).Can you or someone else think of a better name? That sounds like it searches www.r-project.org. I think even 'R Sites Search' would be better. Yes, it is too late: we need lead time for the translators these days. (RGui has Chinese, German, Italian and Japanese menus available.)> > Best, > Andy > > --- R-beta/src/gnuwin32/rui.c 2005-03-06 09:41:40.000000000 -0500 > +++ R-beta-new/src/gnuwin32/rui.c 2005-04-12 08:21:55.001824500 -0400 > @@ -65,7 +65,8 @@ > static menuitem msource, mdisplay, mload, msave, mloadhistory, > msavehistory, mpaste, mpastecmds, mcopy, mcopypaste, mlazy, mconfig, > mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata, > - mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, > > + mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, > + msearchRsite, > mFAQ, mrwFAQ, mpkgl, mpkgm, mpkgi, mpkgil, mpkgu, /*mpkgb, mpkgbu,*/ > mde, mCRAN, mrepos; > static int lmanintro, lmanref, lmandata, lmanlang, lmanext, lmanadmin; > @@ -485,6 +486,21 @@ > } > } > > +static void menusearchRsite(control m) > +{ > + char *s; > + static char olds[256] = ""; > + > + if (!ConsoleAcceptCmd) return; > + s = askstring(G_("Search R Site"), olds); > + if (s && strlen(s)) { > + snprintf(cmd, 1024, "RSiteSearch(\"%s\")", s); > + if (strlen(s) > 255) s[255] = '\0'; > + strcpy(olds, s); > + consolecmd(RConsole, cmd); > + } > +} > + > static void menuapropos(control m) > { > char *s; > @@ -560,6 +576,7 @@ > enable(msearch); > enable(mhelp); > enable(mhelpsearch); > + enable(msearchRsite); > enable(mapropos); > enable(mpkgl); > enable(mpkgm); > @@ -579,6 +596,7 @@ > disable(msearch); > disable(mhelp); > disable(mhelpsearch); > + disable(msearchRsite); > disable(mapropos); > disable(mpkgl); > disable(mpkgm); > @@ -985,6 +1003,7 @@ > MCHECK(mhelpstart = newmenuitem(G_("Html help"), 0, menuhelpstart)); > if (!check_doc_file("doc\\html\\rwin.html")) disable(mhelpstart); > MCHECK(mhelpsearch = newmenuitem(G_("Search help..."), 0, > menuhelpsearch)); > + MCHECK(msearchRsite = newmenuitem(G_("Search R Site..."), 0, > menusearchRsite)); > MCHECK(newmenuitem("-", 0, NULL)); > MCHECK(mapropos = newmenuitem(G_("Apropos..."), 0, menuapropos)); > MCHECK(newmenuitem("-", 0, NULL)); > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
> From: Prof Brian Ripley > > On Tue, 12 Apr 2005, Liaw, Andy wrote: > > > Please consider adding the following to the next R release > (I understand > > that it's too late for R-2.1.0). It adds the menu item > `Search R Site' in > > the `Help' menu in Rgui (which calls RSiteSearch() on the > input string). > > Can you or someone else think of a better name? That sounds like it > searches www.r-project.org. I think even 'R Sites Search' would be > better.I can't (sorry, not very imaginative...). Your suggestion is as good as I can see. I guess I can also add more descriptive phrase, e.g., s = askstring(G_("Search in R documentations and R-help archive"), olds); Any other suggestions? Best, Andy> Yes, it is too late: we need lead time for the translators these days. > (RGui has Chinese, German, Italian and Japanese menus available.) > > > > > Best, > > Andy > > > > --- R-beta/src/gnuwin32/rui.c 2005-03-06 > 09:41:40.000000000 -0500 > > +++ R-beta-new/src/gnuwin32/rui.c 2005-04-12 > 08:21:55.001824500 -0400 > > @@ -65,7 +65,8 @@ > > static menuitem msource, mdisplay, mload, msave, mloadhistory, > > msavehistory, mpaste, mpastecmds, mcopy, mcopypaste, > mlazy, mconfig, > > mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata, > > - mmanext, mmanlang, mmanadmin, mman0, mapropos, > mhelpstart, mhelpsearch, > > > > + mmanext, mmanlang, mmanadmin, mman0, mapropos, > mhelpstart, mhelpsearch, > > + msearchRsite, > > mFAQ, mrwFAQ, mpkgl, mpkgm, mpkgi, mpkgil, mpkgu, > /*mpkgb, mpkgbu,*/ > > mde, mCRAN, mrepos; > > static int lmanintro, lmanref, lmandata, lmanlang, lmanext, > lmanadmin; > > @@ -485,6 +486,21 @@ > > } > > } > > > > +static void menusearchRsite(control m) > > +{ > > + char *s; > > + static char olds[256] = ""; > > + > > + if (!ConsoleAcceptCmd) return; > > + s = askstring(G_("Search R Site"), olds); > > + if (s && strlen(s)) { > > + snprintf(cmd, 1024, "RSiteSearch(\"%s\")", s); > > + if (strlen(s) > 255) s[255] = '\0'; > > + strcpy(olds, s); > > + consolecmd(RConsole, cmd); > > + } > > +} > > + > > static void menuapropos(control m) > > { > > char *s; > > @@ -560,6 +576,7 @@ > > enable(msearch); > > enable(mhelp); > > enable(mhelpsearch); > > + enable(msearchRsite); > > enable(mapropos); > > enable(mpkgl); > > enable(mpkgm); > > @@ -579,6 +596,7 @@ > > disable(msearch); > > disable(mhelp); > > disable(mhelpsearch); > > + disable(msearchRsite); > > disable(mapropos); > > disable(mpkgl); > > disable(mpkgm); > > @@ -985,6 +1003,7 @@ > > MCHECK(mhelpstart = newmenuitem(G_("Html help"), 0, > menuhelpstart)); > > if (!check_doc_file("doc\\html\\rwin.html")) > disable(mhelpstart); > > MCHECK(mhelpsearch = newmenuitem(G_("Search help..."), 0, > > menuhelpsearch)); > > + MCHECK(msearchRsite = newmenuitem(G_("Search R Site..."), 0, > > menusearchRsite)); > > MCHECK(newmenuitem("-", 0, NULL)); > > MCHECK(mapropos = newmenuitem(G_("Apropos..."), 0, > menuapropos)); > > MCHECK(newmenuitem("-", 0, NULL)); > > > > ______________________________________________ > > R-devel@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > > > > -- > Brian D. Ripley, ripley@stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > >
Adaikalavan Ramasamy
2005-Apr-13 13:18 UTC
[Rd] patch to add a menu item in Rgui for RSiteSearch
While on the subject, may I also suggest that a menu item to search the BioConductor archives be added. Archives : https://stat.ethz.ch/pipermail/bioconductor/ Search-able archives : http://files.protsuggest.org/cgi-bin/biocond.cgi I hope this is not an unreasonable request considering that there is menu item to select repositories to include BioConductor in R-2.1.0beta. Thank you. Regards, Adai On Tue, 2005-04-12 at 12:57 -0400, Liaw, Andy wrote:> Please consider adding the following to the next R release (I understand > that it's too late for R-2.1.0). It adds the menu item `Search R Site' in > the `Help' menu in Rgui (which calls RSiteSearch() on the input string). > > Best, > Andy > > --- R-beta/src/gnuwin32/rui.c 2005-03-06 09:41:40.000000000 -0500 > +++ R-beta-new/src/gnuwin32/rui.c 2005-04-12 08:21:55.001824500 -0400 > @@ -65,7 +65,8 @@ > static menuitem msource, mdisplay, mload, msave, mloadhistory, > msavehistory, mpaste, mpastecmds, mcopy, mcopypaste, mlazy, mconfig, > mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata, > - mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, > > + mmanext, mmanlang, mmanadmin, mman0, mapropos, mhelpstart, mhelpsearch, > + msearchRsite, > mFAQ, mrwFAQ, mpkgl, mpkgm, mpkgi, mpkgil, mpkgu, /*mpkgb, mpkgbu,*/ > mde, mCRAN, mrepos; > static int lmanintro, lmanref, lmandata, lmanlang, lmanext, lmanadmin; > @@ -485,6 +486,21 @@ > } > } > > +static void menusearchRsite(control m) > +{ > + char *s; > + static char olds[256] = ""; > + > + if (!ConsoleAcceptCmd) return; > + s = askstring(G_("Search R Site"), olds); > + if (s && strlen(s)) { > + snprintf(cmd, 1024, "RSiteSearch(\"%s\")", s); > + if (strlen(s) > 255) s[255] = '\0'; > + strcpy(olds, s); > + consolecmd(RConsole, cmd); > + } > +} > + > static void menuapropos(control m) > { > char *s; > @@ -560,6 +576,7 @@ > enable(msearch); > enable(mhelp); > enable(mhelpsearch); > + enable(msearchRsite); > enable(mapropos); > enable(mpkgl); > enable(mpkgm); > @@ -579,6 +596,7 @@ > disable(msearch); > disable(mhelp); > disable(mhelpsearch); > + disable(msearchRsite); > disable(mapropos); > disable(mpkgl); > disable(mpkgm); > @@ -985,6 +1003,7 @@ > MCHECK(mhelpstart = newmenuitem(G_("Html help"), 0, menuhelpstart)); > if (!check_doc_file("doc\\html\\rwin.html")) disable(mhelpstart); > MCHECK(mhelpsearch = newmenuitem(G_("Search help..."), 0, > menuhelpsearch)); > + MCHECK(msearchRsite = newmenuitem(G_("Search R Site..."), 0, > menusearchRsite)); > MCHECK(newmenuitem("-", 0, NULL)); > MCHECK(mapropos = newmenuitem(G_("Apropos..."), 0, menuapropos)); > MCHECK(newmenuitem("-", 0, NULL)); > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Duncan Murdoch
2005-Apr-13 13:29 UTC
[Rd] patch to add a menu item in Rgui for RSiteSearch
Adaikalavan Ramasamy wrote:> While on the subject, may I also suggest that a menu item to search the > BioConductor archives be added. > > Archives : https://stat.ethz.ch/pipermail/bioconductor/ > Search-able archives : http://files.protsuggest.org/cgi-bin/biocond.cgi > > I hope this is not an unreasonable request considering that there is > menu item to select repositories to include BioConductor in R-2.1.0beta.I think this would make more sense as an enhancement to search.r-project.org (the site where RSiteSearch sends the search request) than to Rgui. Duncan Murdoch
> From: Duncan Murdoch > > Adaikalavan Ramasamy wrote: > > While on the subject, may I also suggest that a menu item > to search the > > BioConductor archives be added. > > > > Archives : https://stat.ethz.ch/pipermail/bioconductor/ > > Search-able archives : > http://files.protsuggest.org/cgi-> bin/biocond.cgi > > > > I hope > this is not an unreasonable > request considering that there is > > menu item to select repositories to include BioConductor in > R-2.1.0beta. > > I think this would make more sense as an enhancement to > search.r-project.org (the site where RSiteSearch sends the search > request) than to Rgui. > > Duncan MurdochJonathan had committed to keep his site up (and gave a very detail set of instructions on how to reconstruct the search page, in case his can not be maintained), before RSiteSearch() was admitted to base R. Is the search site Adai mentioned the `official' BioC archive search page? BTW, Jonathan's search page already includes (all?) BioC packages. The only missing part is the mailing list archives. Andy