Skip to content

Commit

Permalink
On remotes fetch ESSR binary from github
Browse files Browse the repository at this point in the history
   ... instead of my personal site
  • Loading branch information
vspinu committed Sep 9, 2018
1 parent 1ec76e4 commit 75f204f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
3 changes: 3 additions & 0 deletions doc/newfeat.texi
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file added etc/ESSR.rds
Binary file not shown.
12 changes: 2 additions & 10 deletions etc/ESSR/BUILDESSR
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
## -*- mode: R -*-
## code to build ESSR environemnt.
## Assume that current directory is etc/ESSR
## run "./BUILDESSR destdir" to create ESSR_<version>.rda in destdir
## where <version> 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")
30 changes: 15 additions & 15 deletions etc/ESSR/LOADREMOTE
Original file line number Diff line number Diff line change
@@ -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)
})
})
2 changes: 1 addition & 1 deletion etc/ESSR/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.1
1.3

0 comments on commit 75f204f

Please sign in to comment.