Skip to content

Commit 75f204f

Browse files
committed
On remotes fetch ESSR binary from github
... instead of my personal site
1 parent 1ec76e4 commit 75f204f

File tree

5 files changed

+21
-26
lines changed

5 files changed

+21
-26
lines changed

doc/newfeat.texi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ init file. Users of the popular @code{use-package} Emacs package can
150150
now do @code{(use-package ess :defer t)} to take advantage of this
151151
behavior.
152152

153+
@item @ESS{[R]} On remotes ESSR package is now fetched from github
154+
instead of a private site
155+
153156
@item Commands that send the region to the inferior process now deal with rectangular regions.
154157
See the documentation of @code{ess-eval-region} for details. This only
155158
works on Emacs 25.1 and newer.

etc/ESSR.rds

12.8 KB
Binary file not shown.

etc/ESSR/BUILDESSR

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,9 @@
22
## -*- mode: R -*-
33
## code to build ESSR environemnt.
44
## Assume that current directory is etc/ESSR
5-
## run "./BUILDESSR destdir" to create ESSR_<version>.rda in destdir
6-
## where <version> is picked form ./VERSION file
7-
8-
9-
args <- commandArgs(TRUE)
10-
dir <- if(length(args)) args[[1]] else "."
11-
ver <- scan("./VERSION", what = "character", quiet = TRUE)
12-
rda_file <- sprintf("%s/ESSR_%s.rda", dir, ver)
5+
## run "./BUILDESSR" to create ../ESSR.rda
136

147
## exactly as in inferior-ess-r-load-ESSR in ess-r-d.el
158
source('./R/.load.R', local=TRUE)
169
ESSR <- load.ESSR('./R/')
17-
18-
save(ESSR, file = rda_file)
10+
saveRDS(ESSR, file = "../ESSR.rds")

etc/ESSR/LOADREMOTE

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
## -*- mode: R -*-
22
## loading code which is first sent to R on remote sessions
33
local({
4-
curver <- '%s'
5-
## MM: ok for Windows?
6-
## VS: Should be fine (who is using win remote anyways?)
7-
.c.dir <- '~/.config/ESSR'
8-
verfile <- file.path(.c.dir, 'VERSION')
9-
envfile <- file.path(.c.dir, 'ESSR.rda')
10-
ver <- if(file.exists(verfile)) scan(verfile, what = "string") else "0.0"
4+
ver <- '1.3'
5+
root <- '~/.config/ESSR'
6+
if(!file.exists(root))
7+
dir.create(root, recursive = TRUE)
8+
## cannot use sprintf here
9+
essr_file <- file.path(root, paste('ESSRv', ver, '.rds', sep = ''))
1110
tryCatch({
12-
if(ver < curver) {
13-
url <- paste('https://vitalie.spinu.info/ESSR/ESSR_', curver, '.rda', sep = '')
14-
if(!file.exists(.c.dir))
15-
dir.create(.c.dir, recursive = TRUE)
16-
utils::download.file(url, envfile)
17-
cat(curver, file = verfile)
11+
if(!file.exists(essr_file)) {
12+
url <- paste('https://github.com/emacs-ess/ESS/raw/ESSRv', ver, '/etc/ESSR.rds', sep = '')
13+
utils::download.file(url, essr_file)
1814
}
19-
load(envfile)
15+
ESSR <- readRDS(essr_file)
2016
attach(ESSR)
2117
print(TRUE)
22-
} , error = function(e) print(FALSE))
18+
},
19+
error = function(e) {
20+
print(e)
21+
print(FALSE)
22+
})
2323
})

etc/ESSR/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.1
1+
1.3

0 commit comments

Comments
 (0)