pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env Rscript
|
||||
## -*- mode: R -*-
|
||||
## code to build ESSR environemnt.
|
||||
## code to build ESSR environment.
|
||||
## Assume that current directory is etc/ESSR
|
||||
## run "./BUILDESSR" to create ../ESSR.rda
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#### Essential functionality needed by ESS
|
||||
|
||||
## Should work on *all* vesions of R.
|
||||
## Should work on *all* versions of R.
|
||||
## Do not use _ in names, nor :: , nor 1L etc, as they
|
||||
## cannot be parsed in old R versions
|
||||
|
||||
@@ -32,15 +32,18 @@
|
||||
## utils:::print.help_files_with_topic (used internally when there's
|
||||
## more than one a package) uses the quoted call
|
||||
## MM: don't understand; more specifically?
|
||||
.ess.help <- function(...) {
|
||||
..help <- function(...) {
|
||||
do.call(get("help", envir = .GlobalEnv), list(...))
|
||||
}
|
||||
|
||||
if (.ess.Rversion > "2.10") {
|
||||
## Abbreviating help_type to avoid underscore
|
||||
.ess.help(..., help = help.type)
|
||||
if(!is.null(getOption("warnPartialMatchArgs"))) {
|
||||
op <- options(warnPartialMatchArgs = FALSE); on.exit(options(op))
|
||||
}
|
||||
..help(..., help = help.type)
|
||||
} else {
|
||||
.ess.help(..., htmlhelp = help.type == "html")
|
||||
..help(..., htmlhelp = help.type == "html")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +148,7 @@
|
||||
## The following on.exit infloops in R 3.3.0
|
||||
## https://github.com/emacs-ess/ESS/issues/334
|
||||
## https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16971
|
||||
## So we are cleanning it in .ess.source instead.
|
||||
## So we are cleaning it in .ess.source instead.
|
||||
## on.exit(file.remove(file))
|
||||
.ess.source(file, visibly = visibly, output = output,
|
||||
max.deparse.length = max.deparse.length,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
assign(".ess.Rversion", Rver, envir = ESSR)
|
||||
|
||||
## updated by make !!
|
||||
VERSION <- "1.7"
|
||||
VERSION <- "1.8"
|
||||
assign(".ess.ESSRversion", VERSION, envir = ESSR)
|
||||
|
||||
ESSR
|
||||
|
||||
@@ -9,7 +9,7 @@ if(!exists("local"))
|
||||
local <- function(expr, envir = environment()) { invisible(eval(expr, envir=envir)) }
|
||||
|
||||
##' Robust version of
|
||||
##' utils:::.addFunctionInfo(c = c("recursive", "use.names"))
|
||||
##' utils:::.addFunctionInfo(c = c("recursive", "use.names")) # needed only for R <= 3.y.z
|
||||
local({
|
||||
U <- asNamespace("utils"); fn <- ".addFunctionInfo"
|
||||
EX <- exists(fn, envir=U)
|
||||
@@ -30,6 +30,7 @@ local({
|
||||
else x
|
||||
}
|
||||
|
||||
## not needed for completion; called from (ess-r-xref--srcref *) in ../../../lisp/ess-r-xref.el
|
||||
.ess_srcref <- function(name, pkg) {
|
||||
if (!is.null(pkg) && requireNamespace(pkg)) {
|
||||
env <- asNamespace(pkg)
|
||||
@@ -39,19 +40,17 @@ local({
|
||||
fn <- .ess_eval(name, env)
|
||||
if (is.null(fn)) {
|
||||
objs <- utils::getAnywhere(name)$objs
|
||||
for (o in objs) {
|
||||
if (is.function(o)) {
|
||||
fn <- o
|
||||
break;
|
||||
}
|
||||
for (fn in objs) {
|
||||
if(is.function(fn))
|
||||
break
|
||||
}
|
||||
}
|
||||
out <- "()\n"
|
||||
if (is.function(fn) && !is.null(utils::getSrcref(fn))) {
|
||||
file <- utils::getSrcFilename(fn, full.names = TRUE)
|
||||
if (file != "") {
|
||||
line <- .ess_nonull(utils::getSrcLocation(fn, "line"), 1)
|
||||
col <- .ess_nonull(utils::getSrcLocation(fn, "column"), 1)
|
||||
line <- .ess_nonull(utils::getSrcLocation(fn, "line" ), 1)
|
||||
col <- .ess_nonull(utils::getSrcLocation(fn, "column"), 1)
|
||||
out <- sprintf("(\"%s\" %d %d)\n", file, line, col - 1)
|
||||
}
|
||||
}
|
||||
@@ -112,7 +111,11 @@ local({
|
||||
.ess_get_completions <- function(string, end, suffix = " = ") {
|
||||
oldopts <- utils::rc.options(funarg.suffix = suffix)
|
||||
on.exit(utils::rc.options(oldopts))
|
||||
if(.ess.Rversion > '2.14.1'){
|
||||
sett <- utils::rc.settings
|
||||
oldDots <- sett()[["dots"]]
|
||||
on.exit(sett(dots=oldDots), add=TRUE)
|
||||
sett(dots = FALSE)
|
||||
if(.ess.Rversion > '2.14.1') {
|
||||
comp <- compiler::enableJIT(0)
|
||||
op <- options(error=NULL)
|
||||
on.exit({ options(op); compiler::enableJIT(comp)}, add = TRUE)
|
||||
@@ -125,7 +128,7 @@ local({
|
||||
utils:::.retrieveCompletions())
|
||||
}
|
||||
|
||||
.ess_arg_help <- function(arg, func){
|
||||
.ess_arg_help <- function(arg, func) {
|
||||
op <- options(error=NULL)
|
||||
on.exit(options(op))
|
||||
fguess <-
|
||||
@@ -151,9 +154,9 @@ local({
|
||||
}
|
||||
}
|
||||
funcs <- c(fguess, tryCatch(methods(fguess),
|
||||
warning=function(w) {NULL},
|
||||
error=function(e) {NULL}))
|
||||
if(length(funcs) > 1 && length(pos <- grep('default', funcs))){
|
||||
warning= function(w) NULL,
|
||||
error = function(e) NULL))
|
||||
if(length(funcs) > 1 && length(pos <- grep('default', funcs))) {
|
||||
funcs <- c(funcs[[pos[[1]]]], funcs[-pos[[1]]])
|
||||
}
|
||||
i <- 1; found <- FALSE
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
paste0(pkgname, ':::`', dbged, '`')
|
||||
}))
|
||||
env <- parent.frame()
|
||||
## traced function don't appear here. Not realy needed and would affect performance.
|
||||
## traced function don't appear here. Not really needed and would affect performance.
|
||||
all <- .ess_all_functions(packages = packages, env = env)
|
||||
which_deb <- lapply(all, function(nm){
|
||||
## if isdebugged is called with string it doess find
|
||||
@@ -160,10 +160,13 @@
|
||||
.essWEnames <- allNames(exps)
|
||||
len0p <- !nzchar(.essWEnames)
|
||||
.essWEnames[len0p] <- seq_along(len0p)[len0p]
|
||||
oo <- options(width = 10000)
|
||||
on.exit(options(oo))
|
||||
for(i in seq_along(exps)) {
|
||||
cat('\n@---- ', .essWEnames[[i]], ' ',
|
||||
rep.int('-', max(0, 35 - nchar(.essWEnames[[i]]))), '-@\n', sep = '')
|
||||
cat(paste('@---:', deparse(exps[[i]][[1]])), ' \n', sep = '')
|
||||
expr <- gsub(" +", " ", paste(deparse(exps[[i]][[1]]), collapse = " "))
|
||||
cat(paste('@---:', expr), ' \n', sep = '')
|
||||
tryCatch(print(eval(exps[[i]],
|
||||
envir = .parent_frame)),
|
||||
error = function(e) cat('Error:', e$message, '\n' ),
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
} else {
|
||||
if (is.matrix(x))
|
||||
x <- data.frame(unclass(x))
|
||||
## conversion needed, to avoid problems with derived classes suchs
|
||||
## conversion needed, to avoid problems with derived classes such
|
||||
## as data.table
|
||||
h <- as.data.frame(head(x, hlength))
|
||||
t <- as.data.frame(tail(x, tlength))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## simple Message Parsing Inerface
|
||||
## simple Message Parsing Interface
|
||||
|
||||
.ess_mpi_send <- function(head, ...){
|
||||
dots <- lapply(list(...), function(el) {
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
## table is used. When ess-developer is used to source method definitions the
|
||||
## two copies of the functions are identical up to the environment. The
|
||||
## environment of the cached object has namespace:foo as it's parent but the
|
||||
## environment of the object in local table is precisely namspace:foo. This
|
||||
## environment of the object in local table is precisely namespace:foo. This
|
||||
## does not cause any difference in evaluation.
|
||||
methodNames <- allMethodTables
|
||||
methods <- sub(methods:::.TableMetaPrefix(), "", methodNames)
|
||||
|
||||
Reference in New Issue
Block a user