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));
patch to add a menu item in Rgui for RSiteSearch
7 messages · Liaw, Andy, Duncan Murdoch, Brian Ripley +1 more
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
Prof Brian Ripley wrote:
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.)
I'd suggest "R help online...". After the release, I think this should go into R-patched. Do we have tools to tell the translators all the new strings that need translating, or should they be explicitly informed about such a thing? Duncan Murdoch
On Wed, 13 Apr 2005, Duncan Murdoch wrote:
Prof Brian Ripley wrote:
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.)
I'd suggest "R help online...".
But, it is not 'help online': it is searching docs and past help.
After the release, I think this should go into R-patched. Do we have tools to tell the translators all the new strings that need translating, or should they be explicitly informed about such a thing?
Yes, msgmerge/msgfmt tells them. The message catalogues change almost daily as people add features.
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
Prof Brian Ripley wrote:
On Wed, 13 Apr 2005, Duncan Murdoch wrote:
Prof Brian Ripley wrote:
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.)
I'd suggest "R help online...".
But, it is not 'help online': it is searching docs and past help.
That's "help" in the Windows Help-menu sense, but the important word is "online". Some alternatives: "R online..." (sounds like it runs R online, but maybe the context is enough) "Search online..." (easily confused with a general Google search) "R sites online..." In any case, the 2 or 3 words in the menu aren't going to be the only clue to the user: the dialog box should give a line or two describing what will happen when you do the search. Duncan Murdoch
After the release, I think this should go into R-patched. Do we have tools to tell the translators all the new strings that need translating, or should they be explicitly informed about such a thing?
Yes, msgmerge/msgfmt tells them. The message catalogues change almost daily as people add features.
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
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