diff --git a/doc/newfeat.texi b/doc/newfeat.texi index e4e4df6ff..6159d3221 100644 --- a/doc/newfeat.texi +++ b/doc/newfeat.texi @@ -150,6 +150,9 @@ init file. Users of the popular @code{use-package} Emacs package can now do @code{(use-package ess :defer t)} to take advantage of this behavior. +@item @ESS{[R]} On remotes ESSR package is now fetched from github +instead of a private site + @item Commands that send the region to the inferior process now deal with rectangular regions. See the documentation of @code{ess-eval-region} for details. This only works on Emacs 25.1 and newer. diff --git a/etc/ESSR.rds b/etc/ESSR.rds new file mode 100644 index 000000000..31e59c951 Binary files /dev/null and b/etc/ESSR.rds differ diff --git a/etc/ESSR/BUILDESSR b/etc/ESSR/BUILDESSR index 536132b56..86a87dd72 100755 --- a/etc/ESSR/BUILDESSR +++ b/etc/ESSR/BUILDESSR @@ -2,17 +2,9 @@ ## -*- mode: R -*- ## code to build ESSR environemnt. ## Assume that current directory is etc/ESSR -## run "./BUILDESSR destdir" to create ESSR_.rda in destdir -## where is picked form ./VERSION file - - -args <- commandArgs(TRUE) -dir <- if(length(args)) args[[1]] else "." -ver <- scan("./VERSION", what = "character", quiet = TRUE) -rda_file <- sprintf("%s/ESSR_%s.rda", dir, ver) +## run "./BUILDESSR" to create ../ESSR.rda ## exactly as in inferior-ess-r-load-ESSR in ess-r-d.el source('./R/.load.R', local=TRUE) ESSR <- load.ESSR('./R/') - -save(ESSR, file = rda_file) +saveRDS(ESSR, file = "../ESSR.rds") diff --git a/etc/ESSR/LOADREMOTE b/etc/ESSR/LOADREMOTE index 61b388733..294d5cf06 100644 --- a/etc/ESSR/LOADREMOTE +++ b/etc/ESSR/LOADREMOTE @@ -1,23 +1,23 @@ ## -*- mode: R -*- ## loading code which is first sent to R on remote sessions local({ - curver <- '%s' - ## MM: ok for Windows? - ## VS: Should be fine (who is using win remote anyways?) - .c.dir <- '~/.config/ESSR' - verfile <- file.path(.c.dir, 'VERSION') - envfile <- file.path(.c.dir, 'ESSR.rda') - ver <- if(file.exists(verfile)) scan(verfile, what = "string") else "0.0" + ver <- '1.3' + root <- '~/.config/ESSR' + if(!file.exists(root)) + dir.create(root, recursive = TRUE) + ## cannot use sprintf here + essr_file <- file.path(root, paste('ESSRv', ver, '.rds', sep = '')) tryCatch({ - if(ver < curver) { - url <- paste('https://vitalie.spinu.info/ESSR/ESSR_', curver, '.rda', sep = '') - if(!file.exists(.c.dir)) - dir.create(.c.dir, recursive = TRUE) - utils::download.file(url, envfile) - cat(curver, file = verfile) + if(!file.exists(essr_file)) { + url <- paste('https://github.com/emacs-ess/ESS/raw/ESSRv', ver, '/etc/ESSR.rds', sep = '') + utils::download.file(url, essr_file) } - load(envfile) + ESSR <- readRDS(essr_file) attach(ESSR) print(TRUE) - } , error = function(e) print(FALSE)) + }, + error = function(e) { + print(e) + print(FALSE) + }) }) diff --git a/etc/ESSR/VERSION b/etc/ESSR/VERSION index cb174d58a..a58941b07 100644 --- a/etc/ESSR/VERSION +++ b/etc/ESSR/VERSION @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.3 \ No newline at end of file