Re: [ESS] feature request : completion of available packages name
Thanks to you all ! C-c C-e C-l is quite a time saver indeed ! And running `rc.settings(ipck = TRUE)` does provide the kind of completion I was thinking of. ESS rocks. Le mer. 4 janv. 2017 à 08:09, Deepayan Sarkar a écrit : > On Wed, Jan 4, 2017 at 1:52 AM, Martin Maechler > wrote: > > On Tue, Jan 3, 2017 at 6:30 PM, Samuel BARRETO > > wrote: > >> Hi, > >> > >> Do you think it would be difficult to add some kind of completion > backend > >> to complete the package names when typing `library(` ? > >> I was thinking that the list of packages could be populated by calling > >> something like : > >> > >> names(installed.packages()[,2]) > >> > >> But I don't know enough elisp to implement it myself… > > > > Don't do it the way Rstudio does (it has very slow startup time, in > > parts of its interface, because it not only wants to know the package > > names of all my many thousand packages in my dozen of libraries in > > .libPaths(), but it also want to prepare all the help pages ... or > > something close to that). > > > > More seriously: We do something like that already in ESS for quite a > > while now but I don't recall the details. > > You also may want to give more details about the kind of completion.. > > notably as emacs / ESS have quite a few different completion > > possibilities, as we have been told recently here. > > Try executing > > rc.settings(ipck = TRUE) > > in your R session or .Rprofile and see if it works. It should as long > as ESS uses R's completion mechanism. > > It does require running installed.packages() to create the cache, > which can be slow the first time for large/NFS libraries, which is why > it's disabled by default. > > -Deepayan > [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] feature request : completion of available packages name
> Samuel BARRETO > on Wed, 4 Jan 2017 08:53:10 + writes: > Thanks to you all ! > C-c C-e C-l is quite a time saver indeed ! with thanks to Chuck, indeed. HOWEVER: I'm discouraging its use in favor of the completion mechanism below: Very early in ESS history, i.e., the early '90s, we agreed on "The source code is real. The objects are realizations of the source code." etc, e.g., see at http://ess.r-project.org/Manual/ess.html#Philosophies-for-using-ESS_0028S_0029 and in the mean time, with reproducibility and literate programing "every where", you should have been taught to work with *.R (or *.Rnw, *.Rmd, ..) scripts rather than doodling away in the R buffer aka R console. ... which is really what C-c C-e C-l is about. Rather you *do* want the correct require() / library() function calls in your *source* code, right, as I mentioned: "The source code is real ... " > And running `rc.settings(ipck = TRUE)` does provide the kind of completion > I was thinking of. > ESS rocks. yes indeed, thank you! In this respect not the least thanks to all the R-side completion work by Deepayan Sarkar!! Martin > Le mer. 4 janv. 2017 à 08:09, Deepayan Sarkar a > écrit : >> On Wed, Jan 4, 2017 at 1:52 AM, Martin Maechler >> wrote: >> > On Tue, Jan 3, 2017 at 6:30 PM, Samuel BARRETO >> > wrote: >> >> Hi, >> >> >> >> Do you think it would be difficult to add some kind of completion >> backend >> >> to complete the package names when typing `library(` ? >> >> I was thinking that the list of packages could be populated by calling >> >> something like : >> >> >> >> names(installed.packages()[,2]) >> >> >> >> But I don't know enough elisp to implement it myself… >> > >> > Don't do it the way Rstudio does (it has very slow startup time, in >> > parts of its interface, because it not only wants to know the package >> > names of all my many thousand packages in my dozen of libraries in >> > .libPaths(), but it also want to prepare all the help pages ... or >> > something close to that). >> > >> > More seriously: We do something like that already in ESS for quite a >> > while now but I don't recall the details. >> > You also may want to give more details about the kind of completion.. >> > notably as emacs / ESS have quite a few different completion >> > possibilities, as we have been told recently here. >> >> Try executing >> >> rc.settings(ipck = TRUE) >> >> in your R session or .Rprofile and see if it works. It should as long >> as ESS uses R's completion mechanism. >> >> It does require running installed.packages() to create the cache, >> which can be slow the first time for large/NFS libraries, which is why >> it's disabled by default. >> >> -Deepayan >> > [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] feature request : completion of available packages name
On Wed, Jan 4, 2017 at 1:52 AM, Martin Maechler wrote: > On Tue, Jan 3, 2017 at 6:30 PM, Samuel BARRETO > wrote: >> Hi, >> >> Do you think it would be difficult to add some kind of completion backend >> to complete the package names when typing `library(` ? >> I was thinking that the list of packages could be populated by calling >> something like : >> >> names(installed.packages()[,2]) >> >> But I don't know enough elisp to implement it myself… > > Don't do it the way Rstudio does (it has very slow startup time, in > parts of its interface, because it not only wants to know the package > names of all my many thousand packages in my dozen of libraries in > .libPaths(), but it also want to prepare all the help pages ... or > something close to that). > > More seriously: We do something like that already in ESS for quite a > while now but I don't recall the details. > You also may want to give more details about the kind of completion.. > notably as emacs / ESS have quite a few different completion > possibilities, as we have been told recently here. Try executing rc.settings(ipck = TRUE) in your R session or .Rprofile and see if it works. It should as long as ESS uses R's completion mechanism. It does require running installed.packages() to create the cache, which can be slow the first time for large/NFS libraries, which is why it's disabled by default. -Deepayan __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] feature request : completion of available packages name
On Tue, 3 Jan 2017, Martin Maechler wrote: On Tue, Jan 3, 2017 at 6:30 PM, Samuel BARRETO wrote: Hi, Do you think it would be difficult to add some kind of completion backend to complete the package names when typing `library(` ? [deleted] More seriously: We do something like that already in ESS for quite a while now but I don't recall the details. I suspect Martin knows this, but ... C-c C-e C-l runs ess-load-library. With `ido' enabled, it puts a list in the minibuffer where fuzzy matching will narrow it down to the package one wants. Hitting TAB will display all the package names that fuzzily match in a completion buffer. Thanks for reminding me of the nifty feature! Chuck __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] feature request : completion of available packages name
On Tue, Jan 3, 2017 at 6:30 PM, Samuel BARRETO wrote: > Hi, > > Do you think it would be difficult to add some kind of completion backend > to complete the package names when typing `library(` ? > I was thinking that the list of packages could be populated by calling > something like : > > names(installed.packages()[,2]) > > But I don't know enough elisp to implement it myself… Don't do it the way Rstudio does (it has very slow startup time, in parts of its interface, because it not only wants to know the package names of all my many thousand packages in my dozen of libraries in .libPaths(), but it also want to prepare all the help pages ... or something close to that). More seriously: We do something like that already in ESS for quite a while now but I don't recall the details. You also may want to give more details about the kind of completion.. notably as emacs / ESS have quite a few different completion possibilities, as we have been told recently here. Martin Maechler ETH Zurich > > Thanks ! > Samuel Barreto > __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
[ESS] feature request : completion of available packages name
Hi, Do you think it would be difficult to add some kind of completion backend to complete the package names when typing `library(` ? I was thinking that the list of packages could be populated by calling something like : names(installed.packages()[,2]) But I don't know enough elisp to implement it myself… Thanks ! Samuel Barreto [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help