Skip to content

Better support ESS by allowing choice of CRAN mirror using the `menu-choice` widget

4 messages · Bryce Carson, Dirk Eddelbuettel

#
This would allow ESS to be used in a graphical-mode emacs without utilizing
the Tcl/Tk widget, and on non-Linux platforms would allow Emacs to provide
the choice widget rather than Tcl/Tk, Aqua, or whatever Windows does.
#
I know ESS already has a better interface for installing packages, C-c C-e
TAB, but it'd be "neat" if when I forget to do this and I call
install.packages() without first setting a mirror that either the same
interface would be presented rather than Tcl/Tk, or a widget.el-based
interface was presented.

On Tue, Apr 8, 2025 at 3:08?PM Bryce Carson <bryce.a.carson at gmail.com>
wrote:

  
  
#
On 8 April 2025 at 23:15, Bryce Carson wrote:
| I know ESS already has a better interface for installing packages, C-c C-e
| TAB, but it'd be "neat" if when I forget to do this and I call
| install.packages() without first setting a mirror that either the same
| interface would be presented rather than Tcl/Tk, or a widget.el-based
| interface was presented.

You could avoid the issue by setting the CDN-served cloud.r-project.org up as
your default. The ways CDNs work, they will always automatically find you the
closest server in their network. No need to manually select.

I set the following up as the default for the Debian (and hence Ubuntu,
PopOS!, ...) package back in 2018 as part of Rprofile.site:

  ## We set the cloud mirror, which is 'network-close' to everybody, as default
  local({
      r <- getOption("repos")
      r["CRAN"] <- "https://cloud.r-project.org"
      options(repos = r)
  })

and use it personally too.

In your case ESS would dispatch to R, and R would do "The Right Thing (TM)"
as instructed.

Dirk
#
I see, a profile option is a good idea.

I think I will tinker with the ESS package a bit regardless and see what
interesting things can be done.
On Wed., Apr. 9, 2025, 7:02 p.m. Dirk Eddelbuettel, <edd at debian.org> wrote: