From noreply at r-forge.r-project.org Sat Mar 1 20:56:51 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 1 Mar 2014 20:56:51 +0100 (CET) Subject: [Sciviews-commits] r544 - in pkg/svKomodo: . R Message-ID: <20140301195651.8F9B6186C48@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-01 20:56:51 +0100 (Sat, 01 Mar 2014) New Revision: 544 Modified: pkg/svKomodo/DESCRIPTION pkg/svKomodo/R/svKomodo-internal.R Log: Slight change in .OnAttach and elimination of Author field from DESCRIPTION to pass R CMD check --as-cran Modified: pkg/svKomodo/DESCRIPTION =================================================================== --- pkg/svKomodo/DESCRIPTION 2014-02-10 18:28:05 UTC (rev 543) +++ pkg/svKomodo/DESCRIPTION 2014-03-01 19:56:51 UTC (rev 544) @@ -5,7 +5,6 @@ Title: SciViews GUI API - Functions to interface with Komodo Edit/IDE Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), svMisc (>= 0.9-68) Imports: utils Modified: pkg/svKomodo/R/svKomodo-internal.R =================================================================== --- pkg/svKomodo/R/svKomodo-internal.R 2014-02-10 18:28:05 UTC (rev 543) +++ pkg/svKomodo/R/svKomodo-internal.R 2014-03-01 19:56:51 UTC (rev 544) @@ -8,8 +8,8 @@ where <- grepl(regexp, args) if (any(where)) { arg <- rev(args[where])[1] - return(sub(regexp, "", arg)) - } else return(NULL) + sub(regexp, "", arg) + } else NULL } ## For those items not defined yet @@ -148,7 +148,7 @@ if (Sys.getenv("koAppFile") != "") { Komodo <- Sys.getenv("koAppFile") } else Komodo <- "" - #if (Komodo != "") debugMsg("path to Komodo was passed in environment") + if (.Platform$OS.type == "unix") { if (Komodo == "") Komodo <- "/usr/local/bin/komodo" # Default location @@ -166,7 +166,7 @@ err.null <- function (e) return(NULL) ## On Windows, 'komodo' should be enough - ## But for reasons that escape me, Komodo seems to stip off its + ## But for reasons that escape me, Komodo seems to strip off its ## own directory from the path variable. So, I have to restore ## it from the Windows registry :-( @@ -199,9 +199,7 @@ "komodo.exe", fsep = "\\")) } } - #debugMsg("Komodo searched for in registry in", key) } - #debugMsg("Komodo path is:", Komodo) } if (length(Komodo) && Komodo != "" && file.exists(Komodo)) { @@ -221,9 +219,6 @@ pager2(files = files, header = header, title = title, delete.file = delete.file) } else { - ## Replacement for the following line of code to avoid - ## using .Internal() - #.Internal(file.show(files, header, title, delete.file, pager2)) file.show(files, header = header, title = title, delete.file = delete.file, pager = pager2) } @@ -272,18 +267,15 @@ ## Make sure we use HTML help (required for Alt-F1 and Alt-Shift-F1) ## to display R help in Komodo Edit - ## (in Windows, chmhelp is the default up to R 2.9.2) - ##Old code: if (.Platform$OS.type == "windows") options(chmhelp = FALSE) - ##Old code: options(htmlhelp = TRUE) - ## In R 2.10, help system is completely changed options(help_type = "html") ## Make sure the help server is started - ## TODO: how to get it without using ::: ? - if (tools:::httpdPort == 0L) - tools::startDynamicHelp() + port <- try(tools::startDynamicHelp(), silent = TRUE) + if (inherits(port, "try-error")) { + ## Dynamic help is already started + port <- getNamespace("tools")$httpdPort + } ## Record the home page for the help server in an option - ## TODO: idem here! - options(helphome = paste("http://127.0.0.1:", tools:::httpdPort, + options(helphome = paste("http://127.0.0.1:", port, "/doc/html/index.html", sep = "")) ## I need to get the help file URL, but help() does not provide it any @@ -295,16 +287,14 @@ htmlfile <- basename(file) if (length(file) > 1) { ## If more then one topic is found - ## TODO: avoid using ::: here! - return(paste("http://127.0.0.1:", tools:::httpdPort, - "/library/NULL/help/", attr(x,"topic"), sep = "")) + paste("http://127.0.0.1:", getNamespace("tools")$httpdPort, + "/library/NULL/help/", attr(x,"topic"), sep = "") } else { if(substring(htmlfile, nchar(htmlfile) -4) != ".html") htmlfile <- paste(htmlfile, ".html", sep="") - ## TODO: avoid using ::: here! - return(paste("http://127.0.0.1:", tools:::httpdPort, + paste("http://127.0.0.1:", getNamespace("tools")$httpdPort, "/library/", basename(dirname(dirname(file))), - "/html/", htmlfile, sep = "")) + "/html/", htmlfile, sep = "") } }) @@ -473,7 +463,7 @@ #if (!is.null(serve) && "package:svSocket" %in% search()) # stopSocketServer(port = as.integer(serve)[1]) koUninstall() - ## Remove the SciViews tesk callback manager + ## Remove the SciViews task callback manager try(removeTaskCallback("SV-taskCallbackManager"), silent = TRUE) try(rmTemp(".svTaskCallbackManager"), silent = TRUE) } From noreply at r-forge.r-project.org Sat Mar 1 21:03:38 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 1 Mar 2014 21:03:38 +0100 (CET) Subject: [Sciviews-commits] r545 - in pkg/svKomodo: . inst man Message-ID: <20140301200338.D443C186F78@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-01 21:03:37 +0100 (Sat, 01 Mar 2014) New Revision: 545 Modified: pkg/svKomodo/DESCRIPTION pkg/svKomodo/NEWS pkg/svKomodo/inst/NEWS.Rd pkg/svKomodo/man/svKomodo-package.Rd Log: svKomodo version update Modified: pkg/svKomodo/DESCRIPTION =================================================================== --- pkg/svKomodo/DESCRIPTION 2014-03-01 19:56:51 UTC (rev 544) +++ pkg/svKomodo/DESCRIPTION 2014-03-01 20:03:37 UTC (rev 545) @@ -1,7 +1,7 @@ Package: svKomodo Type: Package -Version: 0.9-61 -Date: 2014-01-06 +Version: 0.9-62 +Date: 2014-03-01 Title: SciViews GUI API - Functions to interface with Komodo Edit/IDE Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) Modified: pkg/svKomodo/NEWS =================================================================== --- pkg/svKomodo/NEWS 2014-03-01 19:56:51 UTC (rev 544) +++ pkg/svKomodo/NEWS 2014-03-01 20:03:37 UTC (rev 545) @@ -1,5 +1,12 @@ = svKomodo News +== Changes in svKomodo 0.9-62 + +* Author field rebuild in DESCRIPTION file + +* .onAttach() reworked to eliminate ::: (not allowed by CRAN) + + == Changes in svKomodo 0.9-61 * Simplification of internal code to get Komodo location. It does not require Modified: pkg/svKomodo/inst/NEWS.Rd =================================================================== --- pkg/svKomodo/inst/NEWS.Rd 2014-03-01 19:56:51 UTC (rev 544) +++ pkg/svKomodo/inst/NEWS.Rd 2014-03-01 20:03:37 UTC (rev 545) @@ -1,6 +1,14 @@ \name{NEWS} \title{NEWS file for the svKomodo package} +\section{Changes in version 0.9-62}{ + \itemize{ + \item{ Author field rebuild in DESCRIPTION file } + \item{ \code{.onAttach()} reworked to eliminate \code{:::} (not allowed by CRAN) } + } +} + + \section{Changes in version 0.9-61}{ \itemize{ \item{ Simplification of internal code to get Komodo location. It does not require Modified: pkg/svKomodo/man/svKomodo-package.Rd =================================================================== --- pkg/svKomodo/man/svKomodo-package.Rd 2014-03-01 19:56:51 UTC (rev 544) +++ pkg/svKomodo/man/svKomodo-package.Rd 2014-03-01 20:03:37 UTC (rev 545) @@ -13,8 +13,8 @@ \tabular{ll}{ Package: \tab svKomodo\cr Type: \tab Package\cr - Version: \tab 0.9-61\cr - Date: \tab 2014-01-06\cr + Version: \tab 0.9-62\cr + Date: \tab 2014-03-01\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples From noreply at r-forge.r-project.org Sat Mar 1 21:07:30 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 1 Mar 2014 21:07:30 +0100 (CET) Subject: [Sciviews-commits] r546 - pkg/svKomodo Message-ID: <20140301200730.2232F186FA9@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-01 21:07:24 +0100 (Sat, 01 Mar 2014) New Revision: 546 Modified: pkg/svKomodo/DESCRIPTION Log: Author field recreated in DESCRIPTION file of svKomodo Modified: pkg/svKomodo/DESCRIPTION =================================================================== --- pkg/svKomodo/DESCRIPTION 2014-03-01 20:03:37 UTC (rev 545) +++ pkg/svKomodo/DESCRIPTION 2014-03-01 20:07:24 UTC (rev 546) @@ -3,6 +3,7 @@ Version: 0.9-62 Date: 2014-03-01 Title: SciViews GUI API - Functions to interface with Komodo Edit/IDE +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) Maintainer: Philippe Grosjean From noreply at r-forge.r-project.org Sat Mar 1 22:01:00 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 1 Mar 2014 22:01:00 +0100 (CET) Subject: [Sciviews-commits] r547 - in pkg/svHttp: . R man Message-ID: <20140301210100.B6133186EFB@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-01 22:01:00 +0100 (Sat, 01 Mar 2014) New Revision: 547 Modified: pkg/svHttp/DESCRIPTION pkg/svHttp/NEWS pkg/svHttp/R/httpServer.R pkg/svHttp/man/svHttp-package.Rd Log: svHttp: removed use of ::: Modified: pkg/svHttp/DESCRIPTION =================================================================== --- pkg/svHttp/DESCRIPTION 2014-03-01 20:07:24 UTC (rev 546) +++ pkg/svHttp/DESCRIPTION 2014-03-01 21:01:00 UTC (rev 547) @@ -1,7 +1,7 @@ Package: svHttp Type: Package -Version: 0.9-54 -Date: 2012-04-02 +Version: 0.9-55 +Date: 2014-03-01 Title: SciViews GUI API - R HTTP server Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) Modified: pkg/svHttp/NEWS =================================================================== --- pkg/svHttp/NEWS 2014-03-01 20:07:24 UTC (rev 546) +++ pkg/svHttp/NEWS 2014-03-01 21:01:00 UTC (rev 547) @@ -2,6 +2,13 @@ == Changes in svHttp 0.9-54 +* LICENSE file eliminated. + +* No more use of ::: (not allowed by CRAN). + + +== Changes in svHttp 0.9-54 + * NEWS file reworked to use the new Rd format. * Temporary data are now saved in SciViews:TempEnv environment (was TempEnv), Modified: pkg/svHttp/R/httpServer.R =================================================================== --- pkg/svHttp/R/httpServer.R 2014-03-01 20:07:24 UTC (rev 546) +++ pkg/svHttp/R/httpServer.R 2014-03-01 21:01:00 UTC (rev 547) @@ -21,8 +21,7 @@ ## This port is stored in 'ko.serve' option options(ko.serve = port) ## If the server is running on another port, restart it now - ## TODO: avoid using ::: here => how to get it "officially"? - curport <- tools:::httpdPort + curport <- getNamespace("tools")$httpdPort if (curport > 0 && curport != port) startHttpServer(port = port) return(port) } else { # Get the server port @@ -107,8 +106,7 @@ stopHttpServer <- function (remove.clients = FALSE) { ## Eliminate the SciViews custom process function for HTTP server - ## TODO: how to get it without using ::: ? - e <- tools:::.httpd.handlers.env + e <- getNamespace("tools")$.httpd.handlers.env if ("SciViews" %in% ls(envir = e)) rm(list = "SciViews", envir = e) ## Do we also remove persistent data for clients? @@ -134,8 +132,7 @@ stop("'port' must be a positive integer!") port <- as.integer(round(port[1])) ## The port on which the server currently runs - ## TODO: how to get it without using ::: ? - curport <- tools:::httpdPort + curport <- getNamespace("tools")$httpdPort ## Can we run the server? if (curport == -1L || nzchar(Sys.getenv("R_DISABLE_HTTPD"))) @@ -163,8 +160,7 @@ HttpServerName(name) ## Install the SciViews function that will process our requests - ## TODO: how to get it without using ::: ? - e <- tools:::.httpd.handlers.env + e <- getNamespace("tools")$.httpd.handlers.env e[["SciViews"]] <- function (path, query, body, ...) { ## Analyze the query: command + callback #cat(query, "\n", sep = " -- ") Modified: pkg/svHttp/man/svHttp-package.Rd =================================================================== --- pkg/svHttp/man/svHttp-package.Rd 2014-03-01 20:07:24 UTC (rev 546) +++ pkg/svHttp/man/svHttp-package.Rd 2014-03-01 21:01:00 UTC (rev 547) @@ -14,8 +14,8 @@ \tabular{ll}{ Package: \tab svHttp\cr Type: \tab Package\cr - Version: \tab 0.9-54\cr - Date: \tab 2012-04-02\cr + Version: \tab 0.9-55\cr + Date: \tab 2012-03-01\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples From noreply at r-forge.r-project.org Sun Mar 2 08:06:56 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 2 Mar 2014 08:06:56 +0100 (CET) Subject: [Sciviews-commits] r548 - in pkg: svKomodo svKomodo/R svKomodo/inst svMisc svMisc/R svMisc/man Message-ID: <20140302070656.F2DEE186CA5@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-02 08:06:51 +0100 (Sun, 02 Mar 2014) New Revision: 548 Modified: pkg/svKomodo/NAMESPACE pkg/svKomodo/NEWS pkg/svKomodo/R/svKomodo-internal.R pkg/svKomodo/inst/NEWS.Rd pkg/svMisc/DESCRIPTION pkg/svMisc/NEWS pkg/svMisc/R/completion.R pkg/svMisc/R/descFun.R pkg/svMisc/R/isHelp.R pkg/svMisc/R/pkgMan.R pkg/svMisc/man/svMisc-package.Rd Log: svMisc reworked to eliminate use of :::. IN svKomodo, utils::rc.settings() set on attaching and reset when unloading Modified: pkg/svKomodo/NAMESPACE =================================================================== --- pkg/svKomodo/NAMESPACE 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svKomodo/NAMESPACE 2014-03-02 07:06:51 UTC (rev 548) @@ -1,4 +1,4 @@ -importFrom(utils, capture.output) +importFrom(utils, capture.output, rc.settings) import(svMisc) export(koInstall, Modified: pkg/svKomodo/NEWS =================================================================== --- pkg/svKomodo/NEWS 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svKomodo/NEWS 2014-03-02 07:06:51 UTC (rev 548) @@ -6,7 +6,9 @@ * .onAttach() reworked to eliminate ::: (not allowed by CRAN) +* utils::rc.settings are adjusted in .onAttach() and restored in .onUnload() + == Changes in svKomodo 0.9-61 * Simplification of internal code to get Komodo location. It does not require Modified: pkg/svKomodo/R/svKomodo-internal.R =================================================================== --- pkg/svKomodo/R/svKomodo-internal.R 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svKomodo/R/svKomodo-internal.R 2014-03-02 07:06:51 UTC (rev 548) @@ -114,6 +114,10 @@ ## Make sure config is OK .loadSvOptions() + ## Check that usually inactivated rc.settings are set + assignTemp(".old.rc.settings", rc.settings()) + rc.settings(ipck = TRUE) + ## Create our SciViews task callback manager ## Should eliminate this??? ## PhG: inactivated for now, because it makes problems in R!!! @@ -466,6 +470,11 @@ ## Remove the SciViews task callback manager try(removeTaskCallback("SV-taskCallbackManager"), silent = TRUE) try(rmTemp(".svTaskCallbackManager"), silent = TRUE) + + ## Restore rc.settings + settings <- getTemp(".old.rc.settings", rc.settings()) + do.call("rc.settings", as.list(settings)) + rmTemp(".old.rc.settings") } .packageName <- "svKomodo" Modified: pkg/svKomodo/inst/NEWS.Rd =================================================================== --- pkg/svKomodo/inst/NEWS.Rd 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svKomodo/inst/NEWS.Rd 2014-03-02 07:06:51 UTC (rev 548) @@ -5,6 +5,8 @@ \itemize{ \item{ Author field rebuild in DESCRIPTION file } \item{ \code{.onAttach()} reworked to eliminate \code{:::} (not allowed by CRAN) } + \item{ \code{utils::rc.settings} are adjusted in \code{.onAttach()} and + restored in \code{.onUnload()} } } } Modified: pkg/svMisc/DESCRIPTION =================================================================== --- pkg/svMisc/DESCRIPTION 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) @@ -1,7 +1,7 @@ Package: svMisc Type: Package Version: 0.9-70 -Date: 2013-11-30 +Date: 2014-03-01 Title: SciViews GUI API - Miscellaneous functions Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org"), Modified: pkg/svMisc/NEWS =================================================================== --- pkg/svMisc/NEWS 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/NEWS 2014-03-02 07:06:51 UTC (rev 548) @@ -8,7 +8,9 @@ * Function pkg() is renamed package(). +* Reworked code that was using :::. + == Changes in svMisc 0.9-69 * On Mac OS X >= 10.7, the package could not load because of a warning Modified: pkg/svMisc/R/completion.R =================================================================== --- pkg/svMisc/R/completion.R 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/R/completion.R 2014-03-02 07:06:51 UTC (rev 548) @@ -1,4 +1,3 @@ -## TODO: activate rc.settings(ipck = TRUE) and rc.settings(files = TRUE) completion <- function (code, pos = nchar(code), min.length = 2, print = FALSE, types = c("default", "scintilla"), addition = FALSE, sort = TRUE, what = c("arguments", "functions", "packages"), description = FALSE, @@ -40,8 +39,7 @@ ## Deal with argument completions (ending with " = ") if (length(test.arg <- grep(" = ", completions))) { - ## TODO: avoid using ::: here! - fun <- utils:::.CompletionEnv[["fguess"]] + fun <- getNamespace("utils")$.CompletionEnv[["fguess"]] ret[test.arg, "context"] <- fun ret[test.arg, "desc"] <- descArgs(fun, sub(" = $", "", completions[test.arg])) @@ -126,10 +124,8 @@ ret$context, sep = field.sep), sep = sep) } if (sep != "\n") cat("\n") - return(invisible(ret)) - } else { - return(ret) - } + invisible(ret) + } else ret } ## Do we return the type of the entry, and if yes, in which format? @@ -172,8 +168,8 @@ } else dblBrackets <- FALSE ## Save funarg.suffix and use " = " locally - ## TODO: do not use ::: here! - ComplEnv <- utils:::.CompletionEnv + utilsNS <- getNamespace("utils") + ComplEnv <- utilsNS$.CompletionEnv opts <- ComplEnv$options funarg.suffix <- opts$funarg.suffix on.exit({ @@ -184,14 +180,12 @@ ComplEnv$options <- opts ## Calculate completion with standard R completion tools - ## TODO: do not use ::: here! - utils:::.assignLinebuffer(code) - utils:::.assignEnd(pos) - utils:::.guessTokenFromLine() + utilsNS$.assignLinebuffer(code) + utilsNS$.assignEnd(pos) + utilsNS$.guessTokenFromLine() ## The standard utils:::.completeToken() is replaced by our own version: .completeTokenExt() - ## TODO: do not use ::: here! - completions <- utils:::.retrieveCompletions() + completions <- utilsNS$.retrieveCompletions() triggerPos <- pos - ComplEnv[["start"]] token <- ComplEnv[["token"]] @@ -274,11 +268,13 @@ ## (checked equivalent with R 2.11.1) ## Only difference: it also gets current arguments list (if applicable). ## They are assigned to utils:::.CompletionEnv$funargs -## TODO: avoid using ::: in the code of a package! .inFunctionExt <- -function (line = utils:::.CompletionEnv[["linebuffer"]], -cursor = utils:::.CompletionEnv[["start"]]) +function (line, cursor) { + utilsNS <- getNamespace("utils") + if (missing(line)) line <- utilsNS$.CompletionEnv[["linebuffer"]] + if (missing(cursor)) cursor <- utilsNS$.CompletionEnv[["start"]] + parens <- sapply(c("(", ")"), function(s) gregexpr(s, substr(line, 1L, cursor), fixed = TRUE)[[1L]], simplify = FALSE) @@ -295,7 +291,7 @@ suffix <- substr(line, index + 1L, cursor + 1L) if ((length(grep("=", suffix, fixed = TRUE)) == 0L) && (length(grep(",", suffix, fixed = TRUE)) == 0L)) - utils:::setIsFirstArg(v = TRUE) + utilsNS$setIsFirstArg(v = TRUE) if ((length(grep("=", suffix, fixed = TRUE))) && (length(grep(",", substr(suffix, tail(gregexpr("=", suffix, fixed = TRUE)[[1L]], 1L), 1000000L), fixed = TRUE)) == 0L)) { @@ -314,13 +310,13 @@ } funargs <- strsplit(funargs, "\\s*,\\s*", perl=TRUE)[[1]] funargs <- unname(sapply(funargs, sub, pattern = "\\s*=.*$", - replacement = utils:::.CompletionEnv$options$funarg.suffix, + replacement = utilsNS$.CompletionEnv$options$funarg.suffix, perl=TRUE)) - assign("funargs", funargs, utils:::.CompletionEnv) + assign("funargs", funargs, utilsNS$.CompletionEnv) ## TODO: how to take non named arguments into account too? ## ... addition ends here - possible <- suppressWarnings(strsplit(prefix, utils:::breakRE, + possible <- suppressWarnings(strsplit(prefix, utilsNS$breakRE, perl = TRUE))[[1L]] possible <- possible[possible != ""] if (length(possible)) { @@ -339,24 +335,25 @@ ## Main difference is that calls .inFunctionExt instead of utils:::inFunction ## and it also makes sure completion is for Complete in 'Complete("anova(", )'! .completeTokenExt <- function () { - ComplEnv <- utils:::.CompletionEnv + utilsNS <- getNamespace("utils") + ComplEnv <- utilsNS$.CompletionEnv text <- ComplEnv$token linebuffer <- ComplEnv$linebuffer st <- ComplEnv$start - if (utils:::isInsideQuotes()) { + if (utilsNS$isInsideQuotes()) { probablyNotFilename <- (st > 2L && (substr(linebuffer, st - 1L, st - 1L) %in% c("[", ":", "$"))) if (ComplEnv$settings[["files"]]) { if (probablyNotFilename) { ComplEnv[["comps"]] <- character(0L) } else { - ComplEnv[["comps"]] <- utils:::fileCompletions(text) + ComplEnv[["comps"]] <- utilsNS$fileCompletions(text) } - utils:::.setFileComp(FALSE) + utilsNS$.setFileComp(FALSE) } else { ComplEnv[["comps"]] <- character(0L) - utils:::.setFileComp(TRUE) + utilsNS$.setFileComp(TRUE) } } else { @@ -375,8 +372,8 @@ } ## ... additions until here - utils:::.setFileComp(FALSE) - utils:::setIsFirstArg(FALSE) + utilsNS$.setFileComp(FALSE) + utilsNS$setIsFirstArg(FALSE) guessedFunction <- "" if (ComplEnv$settings[["args"]]) { ## Call of .inFunctionExt() instead of utils:::inFunction() @@ -386,9 +383,9 @@ } assign("fguess", guessedFunction, ComplEnv) - fargComps <- utils:::functionArgs(guessedFunction, text) + fargComps <- utilsNS$functionArgs(guessedFunction, text) - if (utils:::getIsFirstArg() && length(guessedFunction) && + if (utilsNS$getIsFirstArg() && length(guessedFunction) && guessedFunction %in% c("library", "require", "data")) { assign("comps", fargComps, ComplEnv) return() @@ -398,15 +395,15 @@ prefix <- substr(text, 1L, lastArithOp) text <- substr(text, lastArithOp + 1L, 1000000L) } - spl <- utils:::specialOpLocs(text) + spl <- utilsNS$specialOpLocs(text) if (length(spl)) { - comps <- utils:::specialCompletions(text, spl) + comps <- utilsNS$specialCompletions(text, spl) } else { appendFunctionSuffix <- !any(guessedFunction %in% c("help", "args", "formals", "example", "do.call", "environment", "page", "apply", "sapply", "lapply", "tapply", "mapply", "methods", "fix", "edit")) - comps <- utils:::normalCompletions(text, + comps <- utilsNS$normalCompletions(text, check.mode = appendFunctionSuffix) } if (haveArithOp && length(comps)) Modified: pkg/svMisc/R/descFun.R =================================================================== --- pkg/svMisc/R/descFun.R 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/R/descFun.R 2014-03-02 07:06:51 UTC (rev 548) @@ -20,8 +20,7 @@ file <- as.character(file) if (length(file) > 0) { ## Read the Rd file and get the title section out of it - ## TODO: avoid this! - Rdoc <- utils:::.getHelpFile(file[1L]) + Rdoc <- getNamespace("utils")$.getHelpFile(file[1L]) ## Look for the \title tag j <- 0 for (j in seq_along(Rdoc)) @@ -54,8 +53,7 @@ if (!file.exists(paste(RdDB, "rdx", sep="."))) return(character(length(args))) - ## TODO: avoid this! - rd <- tools:::fetchRdDB(RdDB, basename(file)) + rd <- getNamespace("tools")$fetchRdDB(RdDB, basename(file)) ## This is not exported from tools RdTags <- function (Rd) { Modified: pkg/svMisc/R/isHelp.R =================================================================== --- pkg/svMisc/R/isHelp.R 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/R/isHelp.R 2014-03-02 07:06:51 UTC (rev 548) @@ -5,8 +5,8 @@ if (!is.character(topic)) topic <- deparse(topic)[1L] pkgpaths <- find.package(package, lib.loc, verbose = FALSE) - ## TODO: avoid using ::: - file <- utils:::index.search(topic, pkgpaths, TRUE) + utilsNS <- getNamespace("utils") + file <- utilsNS$index.search(topic, pkgpaths, TRUE) if (!length(file)) return(c(help = FALSE, example = FALSE)) packagePath <- dirname(dirname(file)) @@ -16,8 +16,7 @@ tf <- tempfile("Rex") on.exit(unlink(tf)) encoding <- "UTF-8" - ## TODO: avoid using ::: - tools::Rd2ex(utils:::.getHelpFile(file), tf) + tools::Rd2ex(utilsNS$.getHelpFile(file), tf) if (!file.exists(tf)) { c(help = TRUE, example = FALSE) } else c(help = TRUE, example = TRUE) Modified: pkg/svMisc/R/pkgMan.R =================================================================== --- pkg/svMisc/R/pkgMan.R 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/R/pkgMan.R 2014-03-02 07:06:51 UTC (rev 548) @@ -23,8 +23,8 @@ if (isTRUE(print.it)) { write.dcf(as.data.frame.list(desc[!sapply(desc, is.na)], optional = TRUE), width = Inf) - return(invisible(desc)) - } else return(desc) + invisible(desc) + } else desc } pkgManGetMirrors <- function () @@ -93,7 +93,6 @@ imax <- nrow(avpkg.list) idx <- seq(imax) } - #browser() assignTemp('avpkg.pattern', pattern) if (page == "next") { @@ -133,8 +132,7 @@ pkgManInstall <- function (pkgs, install.deps = FALSE, ask = TRUE) { - ## TODO: avoid using ::: ! - dep <- suppressMessages(utils:::getDependencies(pkgs, + dep <- suppressMessages(getNamespace("utils")$getDependencies(pkgs, available = getTemp('avpkg.list'))) msg <- status <- "" if (!isTRUE(ask) && (isTRUE(install.deps) || all(dep %in% pkgs))) { @@ -147,10 +145,8 @@ "This will install packages: %s and %s.", ), paste(sQuote(dep[-l]), collapse = ", "), sQuote(dep[l])) status <- "question" - } - return(list(packages = dep, message = msg, status = status)) - #return(invisible(dep)) + list(packages = dep, message = msg, status = status) } pkgManRemove <- function (pkgName) @@ -170,10 +166,10 @@ pkglib <- normalizePath(file.path(pkgpath, "..")) if (file.access(pkglib, 2) == 0) { remove.packages(pkgName, lib = pkglib) - return(TRUE) + TRUE } else { #warning("No sufficient access rights to library", sQuote(pkglib)) - return(FALSE) + FALSE } }, simplify = FALSE) } @@ -192,7 +188,7 @@ if (packSearchName %in% search()) detach(packSearchName, character.only = TRUE, unload = TRUE) if(pkgName %in% loadedNamespaces()) unloadNamespace(pkgName) - return(TRUE) + TRUE }, error = function(e) { conditionMessage(e) }) }, simplify = FALSE) } Modified: pkg/svMisc/man/svMisc-package.Rd =================================================================== --- pkg/svMisc/man/svMisc-package.Rd 2014-03-01 21:01:00 UTC (rev 547) +++ pkg/svMisc/man/svMisc-package.Rd 2014-03-02 07:06:51 UTC (rev 548) @@ -13,7 +13,7 @@ Package: \tab svMisc\cr Type: \tab Package\cr Version: \tab 0.9-70\cr - Date: \tab 2013-11-30\cr + Date: \tab 2014-03-01\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples From noreply at r-forge.r-project.org Sun Mar 2 09:46:50 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 2 Mar 2014 09:46:50 +0100 (CET) Subject: [Sciviews-commits] r549 - in pkg: SciViews svDialogs svDialogstcltk svDoc svGUI svHttp svIDE svMisc svSocket svSweave svTools svTools/R svTools/man svUnit svWidgets tcltk2 tcltk2/inst/tklibs/ttktheme_clearlooks Message-ID: <20140302084650.AA8B9186848@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-02 09:46:50 +0100 (Sun, 02 Mar 2014) New Revision: 549 Removed: pkg/svDoc/LICENSE Modified: pkg/SciViews/DESCRIPTION pkg/svDialogs/DESCRIPTION pkg/svDialogstcltk/DESCRIPTION pkg/svDoc/DESCRIPTION pkg/svGUI/DESCRIPTION pkg/svHttp/DESCRIPTION pkg/svIDE/DESCRIPTION pkg/svMisc/DESCRIPTION pkg/svSocket/DESCRIPTION pkg/svSweave/DESCRIPTION pkg/svTools/DESCRIPTION pkg/svTools/NEWS pkg/svTools/R/completion.R pkg/svTools/R/errorlist.R pkg/svTools/R/lintDescription.R pkg/svTools/R/lintNamespace.R pkg/svTools/man/svTools-package.Rd pkg/svUnit/DESCRIPTION pkg/svWidgets/DESCRIPTION pkg/tcltk2/DESCRIPTION pkg/tcltk2/inst/tklibs/ttktheme_clearlooks/clearlooks8.5.tcl Log: Rework of DESCRIPTION files Rework of code in svTools to avoid using ::: Slight rework of clearlooks theme in tcltk2 Modified: pkg/SciViews/DESCRIPTION =================================================================== --- pkg/SciViews/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/SciViews/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-12 Date: 2014-02-10 Title: SciViews GUI API - Main package +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), methods, grDevices, graphics, stats, MASS Imports: ellipse Modified: pkg/svDialogs/DESCRIPTION =================================================================== --- pkg/svDialogs/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svDialogs/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-54 Date: 2013-01-27 Title: SciViews GUI API - Dialog boxes +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), svGUI (>= 0.9-52) SystemRequirements: TODO!!! Modified: pkg/svDialogstcltk/DESCRIPTION =================================================================== --- pkg/svDialogstcltk/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svDialogstcltk/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-4 Date: 2013-11-30 Title: SciViews GUI API - Dialog boxes using Tcl/Tk +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), svDialogs (>= 0.9-50), tcltk Imports: svGUI (>= 0.9-52) Modified: pkg/svDoc/DESCRIPTION =================================================================== --- pkg/svDoc/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svDoc/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-9 Date: 2013-09-21 Title: SciViews GUI API - svDoc functions +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), svMisc, ascii Imports: utils Deleted: pkg/svDoc/LICENSE =================================================================== --- pkg/svDoc/LICENSE 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svDoc/LICENSE 2014-03-02 08:46:50 UTC (rev 549) @@ -1,88 +0,0 @@ -The svDoc package is licensed underg GPL-2 license. -However, it includes other open source software components with the following -licenses: - -- asciidoc -- jQuery -- jslider -- easytabs - -asciidoc license ----------------------------------------------------------------------- -Copyright (C) 2000-2007 Stuart Rackham - -Email: srackham at gmail.com - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -USA. - - -jQuery license ----------------------------------------------------------------------- - -Copyright (c) 2012 jQuery Foundation and other contributors, -http://jquery.com/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -jslider license ----------------------------------------------------------------------- - -The MIT License (MIT) -Copyright (c) 2012 Egor Khmelev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -easytabs license ----------------------------------------------------------------------- - -By Steve Schwartz](https://github.com/JangoSteve - http://www.alfajango.com) -Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) -and GPL (http://www.gnu.org/licenses/gpl.html) licenses. Modified: pkg/svGUI/DESCRIPTION =================================================================== --- pkg/svGUI/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svGUI/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-54 Date: 2013-01-27 Title: SciViews GUI API - Functions to manage GUIs +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0) Description: Functions to manage GUIs from R Modified: pkg/svHttp/DESCRIPTION =================================================================== --- pkg/svHttp/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svHttp/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-55 Date: 2014-03-01 Title: SciViews GUI API - R HTTP server +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.11.0) Imports: tools, svMisc (>= 0.9-68) Modified: pkg/svIDE/DESCRIPTION =================================================================== --- pkg/svIDE/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svIDE/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-50 Date: 2010-09-25 Title: SciViews GUI API - IDE and code editor functions +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0) Imports: utils, tcltk, svMisc, XML Modified: pkg/svMisc/DESCRIPTION =================================================================== --- pkg/svMisc/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svMisc/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,13 +3,15 @@ Version: 0.9-70 Date: 2014-03-01 Title: SciViews GUI API - Miscellaneous functions +Author: Philippe Grosjean [aut, cre], + Romain Francois [ctb], + Kamil Barton [ctb] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org"), person("Romain", "Francois", role = "ctb", email = "romain at r-enthusiasts.com"), person("Kamil", "Barton", role = "ctb", email = "kamil.barton at uni-wuerzburg.de")) -Author: Philippe Grosjean, with contributions from Romain Francois and Kamil Barton Maintainer: Philippe Grosjean Imports: utils, methods, tools Depends: R (>= 2.13.0) Modified: pkg/svSocket/DESCRIPTION =================================================================== --- pkg/svSocket/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svSocket/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,11 +3,12 @@ Version: 0.9-55 Date: 2013-01-28 Title: SciViews GUI API - R Socket Server +Author: Philippe Grosjean [aut, cre], + Matthew Dowle [ctb] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org"), person("Matthew", "Dowle", role = "ctb", email = "mdowle at mdowle.plus.com")) -Author: Philippe Grosjean, with contributions from Matthew Dowle Maintainer: Philippe Grosjean Depends: R (>= 2.6.0) Imports: tcltk, svMisc (>= 0.9-68) Modified: pkg/svSweave/DESCRIPTION =================================================================== --- pkg/svSweave/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svSweave/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-8 Date: 2013-01-27 Title: SciViews GUI API - Sweave functions +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.6.0), knitr Imports: utils Modified: pkg/svTools/DESCRIPTION =================================================================== --- pkg/svTools/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -1,13 +1,14 @@ Package: svTools Type: Package Version: 0.9-4 -Date: 2013-11-30 +Date: 2014-03-02 Title: SciViews GUI API - Tools (wrapper for packages tools and codetools) +Author: Philippe Grosjean [aut, cre], + Romain Francois [aut] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org"), person("Romain", "Francois", role = "aut", email = "romain at r-enthusiasts.com")) -Author: Philippe Grosjean and Romain Francois Maintainer: Philippe Grosjean Depends: R (>= 2.6.0) Imports: utils, tools, codetools, svMisc Modified: pkg/svTools/NEWS =================================================================== --- pkg/svTools/NEWS 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/NEWS 2014-03-02 08:46:50 UTC (rev 549) @@ -5,7 +5,9 @@ * Internal change: tools:::file_path_as_absolute() changed to tools::file_path_as_absolute(). +* Reworked other uses of :::. + == Changes in svTools 0.9-3 * Fixed a bug in lint() that prevented to retrieve warnings from codetools 0.2-8 Modified: pkg/svTools/R/completion.R =================================================================== --- pkg/svTools/R/completion.R 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/R/completion.R 2014-03-02 08:46:50 UTC (rev 549) @@ -1,13 +1,13 @@ -## TODO: avoid using ::: everywhere here!!! completeCode <- function (...) { + utilsNS <- getNamespace("utils") out <- completion(..., min.length = 1) if (is.null(out)) { out <- matrix("", ncol = 4, nrow = 0) - token <- utils:::.guessTokenFromLine() + token <- utilsNS$.guessTokenFromLine() } else { token <- attr(out, "token") - if (is.null(token)) token <- utils:::.guessTokenFromLine() + if (is.null(token)) token <- utilsNS$.guessTokenFromLine() types <- rep("function", nrow(out)) completions <- out[, 1] types[regexpr("= *$", completions) > 0] <- "argument" @@ -16,7 +16,7 @@ out <- cbind(out, types)[order(types), , drop = FALSE] } - fun <- utils:::inFunction() + fun <- utilsNS$inFunction() if (length(fun) && !is.na(fun)) { tooltip <- callTip(fun) } else { Modified: pkg/svTools/R/errorlist.R =================================================================== --- pkg/svTools/R/errorlist.R 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/R/errorlist.R 2014-03-02 08:46:50 UTC (rev 549) @@ -1,6 +1,5 @@ ### Removes errors concerning a file or a set of files from the list of errors ### Romain Francois -## TODO: avoid using ::: everywhere here!!! resetErrors <- function (file = NULL, pattern = NULL) { if (!is.null(file)) { Modified: pkg/svTools/R/lintDescription.R =================================================================== --- pkg/svTools/R/lintDescription.R 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/R/lintDescription.R 2014-03-02 08:46:50 UTC (rev 549) @@ -1,4 +1,3 @@ -## TODO: avoid using ::: at several places here! lintDescription <- function (descfile, txt = readLines(descfile)) { txt <- unlist(strsplit(txt, "\\\n")) @@ -89,14 +88,15 @@ message = "the `Date`field should be in format yyyy-mm-dd") } -### TODO: check OS_type that can olny be unix or windows +### TODO: check OS_type that can only be unix or windows ## Check the dependencies ### FIXME: all the stuff below comes from tools, I need to figure out what to do with it - db <- tools:::.read_description(descfile) - depends <- tools:::.get_requires_from_package_db(db, "Depends") - imports <- tools:::.get_requires_from_package_db(db, "Imports") - suggests <- tools:::.get_requires_from_package_db(db, "Suggests") + toolsNS <- getNamespace("tools") + db <- toolsNS$.read_description(descfile) + depends <- toolsNS$.get_requires_from_package_db(db, "Depends") + imports <- toolsNS$.get_requires_from_package_db(db, "Imports") + suggests <- toolsNS$.get_requires_from_package_db(db, "Suggests") reqs <- unique(c(depends, imports, if (!identical(as.logical(Sys.getenv("_R_CHECK_FORCE_SUGGESTS_")), FALSE)) suggests)) @@ -108,7 +108,7 @@ } installed <- sub("_.*", "", installed) reqs <- reqs[!reqs %in% installed] - stdPkgNames <- tools:::.get_standard_package_names() + stdPkgNames <- toolsNS$.get_standard_package_names() m <- reqs %in% stdPkgNames$stubs if (length(reqs[!m])) addErr(line = grep("^(Depends|Suggests|Enhances)", txt), Modified: pkg/svTools/R/lintNamespace.R =================================================================== --- pkg/svTools/R/lintNamespace.R 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/R/lintNamespace.R 2014-03-02 08:46:50 UTC (rev 549) @@ -1,10 +1,9 @@ -## TODO: avoid using ::: at several places here! lintNamespace <- function (namespace, checkPackages = TRUE) { resetErrors(file = namespace) if (isTRUE(checkPackages)) allpacks <- .packages(all.available = TRUE) ## Look for the 'object is not subsettable' error - test <- try(tools:::.check_namespace( + test <- try(getNamespace("tools")$.check_namespace( dirname(tools::file_path_as_absolute(namespace))), silent = TRUE) if (inherits(test, "try-error")) { if (regexpr("object is not subsettable", test) > 0) { Modified: pkg/svTools/man/svTools-package.Rd =================================================================== --- pkg/svTools/man/svTools-package.Rd 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svTools/man/svTools-package.Rd 2014-03-02 08:46:50 UTC (rev 549) @@ -13,7 +13,7 @@ Package: \tab svTools\cr Type: \tab Package\cr Version: \tab 0.9-4\cr - Date: \tab 2012-11-30\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/svUnit/DESCRIPTION =================================================================== --- pkg/svUnit/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svUnit/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.7-11 Date: 2013-01-27 Title: SciViews GUI API - Unit testing +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 1.9.0) Suggests: svGUI, datasets, utils, XML Modified: pkg/svWidgets/DESCRIPTION =================================================================== --- pkg/svWidgets/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/svWidgets/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 0.9-44 Date: 2013-11-30 Title: SciViews GUI API - Widgets & Windows +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.7.0) Imports: tcltk, utils, svMisc (>= 0.9-68) Modified: pkg/tcltk2/DESCRIPTION =================================================================== --- pkg/tcltk2/DESCRIPTION 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/tcltk2/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) @@ -3,9 +3,9 @@ Version: 1.2-9 Date: 2013-12-11 Title: Tcl/Tk Additions +Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), email = "phgrosjean at sciviews.org")) -Author: Philippe Grosjean Maintainer: Philippe Grosjean Depends: R (>= 2.8.0), tcltk Suggests: utils Modified: pkg/tcltk2/inst/tklibs/ttktheme_clearlooks/clearlooks8.5.tcl =================================================================== --- pkg/tcltk2/inst/tklibs/ttktheme_clearlooks/clearlooks8.5.tcl 2014-03-02 07:06:51 UTC (rev 548) +++ pkg/tcltk2/inst/tklibs/ttktheme_clearlooks/clearlooks8.5.tcl 2014-03-02 08:46:50 UTC (rev 549) @@ -89,6 +89,7 @@ ## Buttons. # + ttk::style configure TButton -anchor center ttk::style configure TButton -padding {10 0} ttk::style layout TButton { Button.button -children { From noreply at r-forge.r-project.org Sun Mar 2 11:05:51 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 2 Mar 2014 11:05:51 +0100 (CET) Subject: [Sciviews-commits] r550 - in pkg: SciViews/R svDialogs svDialogs/R svDialogs/man svDialogstcltk svDialogstcltk/man svGUI svGUI/R svGUI/man svIDE svIDE/man svMisc/R svMisc/man svSocket svSocket/R svSocket/man svUnit svUnit/R svUnit/man svWidgets svWidgets/man tcltk2 tcltk2/R tcltk2/man Message-ID: <20140302100551.E7271186F33@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-02 11:05:51 +0100 (Sun, 02 Mar 2014) New Revision: 550 Modified: pkg/SciViews/R/SciViews-internal.R pkg/svDialogs/DESCRIPTION pkg/svDialogs/NEWS pkg/svDialogs/R/svDialogs-internal.R pkg/svDialogs/man/svDialogs-package.Rd pkg/svDialogstcltk/DESCRIPTION pkg/svDialogstcltk/NEWS pkg/svDialogstcltk/man/svDialogstcltk-package.Rd pkg/svGUI/DESCRIPTION pkg/svGUI/NEWS pkg/svGUI/R/svGUI-internal.R pkg/svGUI/man/svGUI-package.Rd pkg/svIDE/DESCRIPTION pkg/svIDE/NEWS pkg/svIDE/man/svIDE-package.Rd pkg/svMisc/R/TempEnv.R pkg/svMisc/man/batch.Rd pkg/svMisc/man/progress.Rd pkg/svSocket/DESCRIPTION pkg/svSocket/NEWS pkg/svSocket/R/startSocketServer.R pkg/svSocket/man/svSocket-package.Rd pkg/svUnit/DESCRIPTION pkg/svUnit/NEWS pkg/svUnit/R/svUnit-internal.R pkg/svUnit/man/svUnit-package.Rd pkg/svWidgets/DESCRIPTION pkg/svWidgets/NEWS pkg/svWidgets/man/svWidgets-package.Rd pkg/tcltk2/DESCRIPTION pkg/tcltk2/NEWS pkg/tcltk2/R/tcltk2-Internal.R pkg/tcltk2/R/tk2fonts.R pkg/tcltk2/man/tcltk2-package.Rd Log: Further rework of DESCRIPTION files Workaround a NOTE for using attach() Modified: pkg/SciViews/R/SciViews-internal.R =================================================================== --- pkg/SciViews/R/SciViews-internal.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/SciViews/R/SciViews-internal.R 2014-03-02 10:05:51 UTC (rev 550) @@ -58,7 +58,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svDialogs/DESCRIPTION =================================================================== --- pkg/svDialogs/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogs/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svDialogs Type: Package -Version: 0.9-54 -Date: 2013-01-27 +Version: 0.9-55 +Date: 2014-03-02 Title: SciViews GUI API - Dialog boxes Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svDialogs/NEWS =================================================================== --- pkg/svDialogs/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogs/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,9 @@ = svDialogs News +== Changes in scDialogs 0.9-55 + +* Rework of Author and Authors at R fileds in the DESCRIPTION file. + == Changes in scDialogs 0.9-54 * Dependencies to tcltk and svMisc are eliminated. Consequently, all functions Modified: pkg/svDialogs/R/svDialogs-internal.R =================================================================== --- pkg/svDialogs/R/svDialogs-internal.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogs/R/svDialogs-internal.R 2014-03-02 10:05:51 UTC (rev 550) @@ -31,7 +31,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svDialogs/man/svDialogs-package.Rd =================================================================== --- pkg/svDialogs/man/svDialogs-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogs/man/svDialogs-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -12,8 +12,8 @@ \tabular{ll}{ Package: \tab svDialogs\cr Type: \tab Package\cr - Version: \tab 0.9-54\cr - Date: \tab 2013-01-27\cr + Version: \tab 0.9-55\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/svDialogstcltk/DESCRIPTION =================================================================== --- pkg/svDialogstcltk/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogstcltk/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svDialogstcltk Type: Package Version: 0.9-4 -Date: 2013-11-30 +Date: 2014-03-02 Title: SciViews GUI API - Dialog boxes using Tcl/Tk Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svDialogstcltk/NEWS =================================================================== --- pkg/svDialogstcltk/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogstcltk/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -4,7 +4,9 @@ * Removed svDialogs in Enhances field, because already in Depends. +* Rework of Author and Authors at R fields in the DESCRIPTION file. + == Changes in svDialogstcltk 0.9-3 * NEWS file reworked to support new Rd format. Modified: pkg/svDialogstcltk/man/svDialogstcltk-package.Rd =================================================================== --- pkg/svDialogstcltk/man/svDialogstcltk-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svDialogstcltk/man/svDialogstcltk-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -11,8 +11,8 @@ \tabular{ll}{ Package: \tab svDialogstcltk\cr Type: \tab Package\cr - Version: \tab 0.9-3\cr - Date: \tab 2012-04-02\cr + Version: \tab 0.9-4\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } Modified: pkg/svGUI/DESCRIPTION =================================================================== --- pkg/svGUI/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svGUI/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svGUI Type: Package -Version: 0.9-54 -Date: 2013-01-27 +Version: 0.9-55 +Date: 2014-03-02 Title: SciViews GUI API - Functions to manage GUIs Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svGUI/NEWS =================================================================== --- pkg/svGUI/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svGUI/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,10 @@ = svGUI News +== Changes in svGUI 0.9-55 + +* Author and Authors at R fields reworked in the DESCRIPTION file. + + == Changes in svGUI 0.9-54 * The package now store temporary data in SciViews:TempEnv instead of TempEnv Modified: pkg/svGUI/R/svGUI-internal.R =================================================================== --- pkg/svGUI/R/svGUI-internal.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svGUI/R/svGUI-internal.R 2014-03-02 10:05:51 UTC (rev 550) @@ -18,7 +18,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svGUI/man/svGUI-package.Rd =================================================================== --- pkg/svGUI/man/svGUI-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svGUI/man/svGUI-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -14,8 +14,8 @@ \tabular{ll}{ Package: \tab svGUI\cr Type: \tab Package\cr - Version: \tab 0.9-54\cr - Date: \tab 2013-01-27\cr + Version: \tab 0.9-55\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/svIDE/DESCRIPTION =================================================================== --- pkg/svIDE/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svIDE/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svIDE Type: Package -Version: 0.9-50 -Date: 2010-09-25 +Version: 0.9-51 +Date: 2014-03-02 Title: SciViews GUI API - IDE and code editor functions Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svIDE/NEWS =================================================================== --- pkg/svIDE/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svIDE/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,10 @@ = svIDE News +== Changes in svIDE 0.9-51 + +* Rework of the Author and Athours at R fields in the DESCRIPTION file. + + == Changes in svIDE 0.9-50 * Addition of a pckage man page. Modified: pkg/svIDE/man/svIDE-package.Rd =================================================================== --- pkg/svIDE/man/svIDE-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svIDE/man/svIDE-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -11,8 +11,8 @@ \tabular{ll}{ Package: \tab svIDE\cr Type: \tab Package\cr - Version: \tab 0.9-50\cr - Date: \tab 2010-09-25\cr + Version: \tab 0.9-52\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/svMisc/R/TempEnv.R =================================================================== --- pkg/svMisc/R/TempEnv.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svMisc/R/TempEnv.R 2014-03-02 10:05:51 UTC (rev 550) @@ -3,7 +3,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svMisc/man/batch.Rd =================================================================== --- pkg/svMisc/man/batch.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svMisc/man/batch.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -35,7 +35,7 @@ fakeProc <- function (file) { message("Processing ", file, "...") flush.console() - Sys.sleep(1) + Sys.sleep(0.5) if (runif(1) > 0.7) { # Fails warning("fakeProc was unable to process ", file) return(invisible(FALSE)) Modified: pkg/svMisc/man/progress.Rd =================================================================== --- pkg/svMisc/man/progress.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svMisc/man/progress.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -70,28 +70,28 @@ ## 1) A simple progress indicator in percent for (i in 0:101) { progress(i) - Sys.sleep(0.05) + Sys.sleep(0.01) if (i == 101) cat("Done!\n") } ## 2) A progress indicator with 'x on y' for (i in 0:31) { progress(i, 30) - Sys.sleep(0.2) + Sys.sleep(0.02) if (i == 31) cat("Done!\n") } ## 3) A progress bar in percent for (i in 0:101) { progress(i, progress.bar = TRUE) - Sys.sleep(0.05) + Sys.sleep(0.01) if (i == 101) cat("Done!\n") } ## 4) A progress indicator with 'x on y' for (i in 0:21) { progress(i, 20, progress.bar = TRUE) - Sys.sleep(0.2) + Sys.sleep(0.03) if (i == 21) cat("Done!\n") } @@ -144,7 +144,7 @@ ## Test it... for (i in 0:101) { progress(i) # Could also set console = FALSE for using the GUI only - Sys.sleep(0.1) + Sys.sleep(0.05) ## The code to stop long calc when user presses "Cancel" if (existsTemp("guiProgressCancel")) { progress(101, console = FALSE) # Make sure to clean up everything Modified: pkg/svSocket/DESCRIPTION =================================================================== --- pkg/svSocket/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svSocket/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svSocket Type: Package -Version: 0.9-55 -Date: 2013-01-28 +Version: 0.9-56 +Date: 2014-03-02 Title: SciViews GUI API - R Socket Server Author: Philippe Grosjean [aut, cre], Matthew Dowle [ctb] Modified: pkg/svSocket/NEWS =================================================================== --- pkg/svSocket/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svSocket/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,10 @@ = svSocket News +== Changes in svSocket 0.9-56 + +* Author and Authors at R fields reworked in the DESCRIPTION file. + + == Changes in svSocket 0.9-55 * evalServer now can pass objects that contain pointers as attributes (e.g., Modified: pkg/svSocket/R/startSocketServer.R =================================================================== --- pkg/svSocket/R/startSocketServer.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svSocket/R/startSocketServer.R 2014-03-02 10:05:51 UTC (rev 550) @@ -71,7 +71,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svSocket/man/svSocket-package.Rd =================================================================== --- pkg/svSocket/man/svSocket-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svSocket/man/svSocket-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -37,8 +37,8 @@ \tabular{ll}{ Package: \tab svSocket\cr Type: \tab Package\cr - Version: \tab 0.9-55\cr - Date: \tab 2013-01-28\cr + Version: \tab 0.9-56\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/svUnit/DESCRIPTION =================================================================== --- pkg/svUnit/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svUnit/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svUnit Type: Package -Version: 0.7-11 -Date: 2013-01-27 +Version: 0.7-12 +Date: 2014-03-02 Title: SciViews GUI API - Unit testing Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svUnit/NEWS =================================================================== --- pkg/svUnit/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svUnit/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,10 @@ = svUnit News +== svUnit 0.7-12 + +* Rework of Author field in DESCRIPTION file. + + == svUnit 0.7-11 * Temporary objects are now saved in SciViews:TempEnv instead of TempEnv. Modified: pkg/svUnit/R/svUnit-internal.R =================================================================== --- pkg/svUnit/R/svUnit-internal.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svUnit/R/svUnit-internal.R 2014-03-02 10:05:51 UTC (rev 550) @@ -428,7 +428,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/svUnit/man/svUnit-package.Rd =================================================================== --- pkg/svUnit/man/svUnit-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svUnit/man/svUnit-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -16,8 +16,8 @@ \tabular{ll}{ Package: \tab svUnit\cr Type: \tab Package\cr - Version: \tab 0.7-11\cr - Date: \tab 2013-01-27\cr + Version: \tab 0.7-12\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } Modified: pkg/svWidgets/DESCRIPTION =================================================================== --- pkg/svWidgets/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svWidgets/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: svWidgets Type: Package Version: 0.9-44 -Date: 2013-11-30 +Date: 2014-03-02 Title: SciViews GUI API - Widgets & Windows Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/svWidgets/NEWS =================================================================== --- pkg/svWidgets/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svWidgets/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -8,7 +8,9 @@ * Idem for MenuXXX(), ToolsXXX() and WinXXX() functions that become menuXXX(), toolsXXX() and winXXX(), respectively. +* Reworked Author fiel in the DESCRIPTION file. + == Changes in svWidgets 0.9-43 * Temporary objects are now stored in SciViews:TempEnv instead of TempEnv, and Modified: pkg/svWidgets/man/svWidgets-package.Rd =================================================================== --- pkg/svWidgets/man/svWidgets-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/svWidgets/man/svWidgets-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -12,7 +12,7 @@ Package: \tab svWidgets\cr Type: \tab Package\cr Version: \tab 0.9-44\cr - Date: \tab 2013-11-30\cr + Date: \tab 2014-03-02\cr License: \tab GPL 2 or above, at your convenience\cr } % TODO: add description of main functions here. Also add examples Modified: pkg/tcltk2/DESCRIPTION =================================================================== --- pkg/tcltk2/DESCRIPTION 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/tcltk2/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) @@ -1,7 +1,7 @@ Package: tcltk2 Type: Package -Version: 1.2-9 -Date: 2013-12-11 +Version: 1.2-10 +Date: 2014-03-02 Title: Tcl/Tk Additions Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), Modified: pkg/tcltk2/NEWS =================================================================== --- pkg/tcltk2/NEWS 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/tcltk2/NEWS 2014-03-02 10:05:51 UTC (rev 550) @@ -1,5 +1,10 @@ = tcltk2 news +== Version 1.2-10 + +* Reworked Author field in the DESCRIPTION file. + + == Version 1.2-9 * New theme handling introduced in version 1.2-8 resulted in an invisible caret Modified: pkg/tcltk2/R/tcltk2-Internal.R =================================================================== --- pkg/tcltk2/R/tcltk2-Internal.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/tcltk2/R/tcltk2-Internal.R 2014-03-02 10:05:51 UTC (rev 550) @@ -278,7 +278,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/tcltk2/R/tk2fonts.R =================================================================== --- pkg/tcltk2/R/tk2fonts.R 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/tcltk2/R/tk2fonts.R 2014-03-02 10:05:51 UTC (rev 550) @@ -126,7 +126,8 @@ pos <- match("SciViews:TempEnv", search()) if (is.na(pos)) { # Must create it `SciViews:TempEnv` <- list() - attach(`SciViews:TempEnv`, pos = length(search()) - 1) + Attach <- function (...) get("attach", mode = "function")(...) + Attach(`SciViews:TempEnv`, pos = length(search()) - 1) rm(`SciViews:TempEnv`) pos <- match("SciViews:TempEnv", search()) } Modified: pkg/tcltk2/man/tcltk2-package.Rd =================================================================== --- pkg/tcltk2/man/tcltk2-package.Rd 2014-03-02 08:46:50 UTC (rev 549) +++ pkg/tcltk2/man/tcltk2-package.Rd 2014-03-02 10:05:51 UTC (rev 550) @@ -16,8 +16,8 @@ \tabular{ll}{ Package: \tab tcltk2\cr Type: \tab Package\cr -Version: \tab 1.2-9\cr -Date: \tab 2013-12-11\cr +Version: \tab 1.2-10\cr +Date: \tab 2014-03-02\cr License: \tab LGPL-3 plus see LICENSE file\cr LazyLoad: \tab yes\cr } From noreply at r-forge.r-project.org Sun Mar 2 12:56:59 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 2 Mar 2014 12:56:59 +0100 (CET) Subject: [Sciviews-commits] r551 - in pkg: svSocket svSocket/inst svSocket/inst/testCLI svSocket/man svUnit svUnit/inst tcltk2 tcltk2/R Message-ID: <20140302115659.55AC4186B59@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-02 12:56:59 +0100 (Sun, 02 Mar 2014) New Revision: 551 Added: pkg/svSocket/inst/testCLI/ pkg/svSocket/inst/testCLI/testCLI.R pkg/svSocket/inst/testCLI/testCLIcmd.R pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.out pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.save pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermUS.out pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermUS.save pkg/svSocket/inst/testCLI/testCLIcmd_RUbuntuTermUS.out pkg/svSocket/inst/testCLI/testCLIcmd_RUbuntuTermUS.save pkg/svSocket/inst/testCLI/testCLIcmd_RappFR.out pkg/svSocket/inst/testCLI/testCLIcmd_RappFR.save pkg/svSocket/inst/testCLI/testCLIcmd_RappUS.out pkg/svSocket/inst/testCLI/testCLIcmd_RappUS.save pkg/svSocket/inst/testCLI/testCLIcmd_RguiFR.out pkg/svSocket/inst/testCLI/testCLIcmd_RguiFR.save pkg/svSocket/inst/testCLI/testCLIcmd_RguiUS.out pkg/svSocket/inst/testCLI/testCLIcmd_RguiUS.save pkg/svSocket/inst/testCLI/testCLIcmd_RtermWinUS.out pkg/svSocket/inst/testCLI/testCLIcmd_RtermWinUS.save pkg/svUnit/inst/TestsvUnit.R Removed: pkg/svSocket/testCLI/ pkg/svUnit/TestsvUnit.R Modified: pkg/svSocket/DESCRIPTION pkg/svSocket/NEWS pkg/svSocket/man/svSocket-package.Rd pkg/tcltk2/NEWS pkg/tcltk2/R/tk2widgets.R Log: Further rework of DESCRIPTION files move of files on the package's root dir to /inst/ subdir Modified: pkg/svSocket/DESCRIPTION =================================================================== --- pkg/svSocket/DESCRIPTION 2014-03-02 10:05:51 UTC (rev 550) +++ pkg/svSocket/DESCRIPTION 2014-03-02 11:56:59 UTC (rev 551) @@ -1,6 +1,6 @@ Package: svSocket Type: Package -Version: 0.9-56 +Version: 0.9-57 Date: 2014-03-02 Title: SciViews GUI API - R Socket Server Author: Philippe Grosjean [aut, cre], Modified: pkg/svSocket/NEWS =================================================================== --- pkg/svSocket/NEWS 2014-03-02 10:05:51 UTC (rev 550) +++ pkg/svSocket/NEWS 2014-03-02 11:56:59 UTC (rev 551) @@ -1,5 +1,10 @@ = svSocket News +== Changes in svSocket 0.9-57 + +* /testCLI directory moved to /inst/testCLI. + + == Changes in svSocket 0.9-56 * Author and Authors at R fields reworked in the DESCRIPTION file. Added: pkg/svSocket/inst/testCLI/testCLI.R =================================================================== --- pkg/svSocket/inst/testCLI/testCLI.R (rev 0) +++ pkg/svSocket/inst/testCLI/testCLI.R 2014-03-02 11:56:59 UTC (rev 551) @@ -0,0 +1,119 @@ +## CLI torture test, copyright (c) Ph. Grosjean (phgrosjean at sciviews.org) +## GNU GPL => 2 license +## A series of commands to check for R CLI (or console widget) +## Note: test this in English, but also, in internationalized versions of R! + +## Copy all text in testCLIcmd.r and paste it in a console window. Copy all +## the content of the console into a document (for instance testCLIres.r) +## Then, run the following code that will do the same, but from a +## processSocket() as if it is issued by a client +## Then, compare both files + +## To test in french, $LANG=fr_FR.UTF8 R or +Sys.setenv(LANG = "fr_FR.UTF8") + +## Open a clean R session, then, issue these commands and copy/paste the content +## of testCLIcmd.r in it... Copy the results from the console into a *.save file +require(svSocket) || stop("Package 'svSocket' is required") +#source('/Users/phgrosjean/Documents/Pgm/SciViews/svSocket/R/RSocketServer.R') +TempEnv_() +res <- outfile <- out <- i <- cmdfile <- cmd0 <- cmd <- "" +options(width = 80) + + +## Run this to generate output with processSocket() +setwd('/Users/phgrosjean/Documents/Pgm/SciViews/svSocket/') +cmdfile <- 'testCLIcmd.R' +outfile <- 'testCLIcmd.out' +require(svSocket) || stop("Package 'svSocket' is required") +#source('/Users/phgrosjean/Documents/Pgm/SciViews/svSocket/R/RSocketServer.R') +options(width = 80) + +## Read the file with commands +cmd <- readLines(cmdfile) +## Run these commands +out <- file(outfile, "w") +cmd0 <- "" +cat("> ", file = out) +for (i in 1:length(cmd)) { + cat(cmd[i], "\n", sep = "", file = out) + if (cmd0 == "") cmd0 <- cmd[i] else + cmd0 <- paste(cmd0, cmd[i], sep = "<<>>") + res <- processSocket(cmd0, "", "") + if (res != "+ ") cmd0 <- "" # Not a multiline command + cat(res, file = out) +} +close(out) +## Until here... + + + + +## User interrupt +## Here is a long calculation. Hit or in mother R app during +## calculation. See how interrupt is managed +###for (i in 1:10000000) i +## Here is a command that issues a very long output. Let it calculate +## and when output starts, hit or in mother R app +## See how interrupt is managed +###1:100000 # This is like if I have to use flush.console() +## TODO: correct handling of flush.console() + +## Interaction at the command line +#scan() # Read in numbers +## Other tests to be implement +#readline() +#non graphical menu() +#create graph (are there problems between the graph device and Tcl/Tk event loop?) +#test ask = TRUE for graphs and demos +#identify() +#locator() +#lattice graph +#rgl graph +#progress() from the svMisc package +#assignment & ->> +#test tcltk windows and widgets + messages (are they printed correctly?) +#:, ::, ::: +#addTaskCallback => do we run it after execution? +#test history and the like +#q("yes"), q("no"), q() +#UTF-8 or other non ASCII characters (input and output) +#break +#debug +#trace +#browser +#test connections +#source +#sink +#capture.output +#try & tryCatch +#on.exit, sys.on.exit +#Cstack_info +#eval, evalq, eval.parent, local +#exists +#test size of console output and allow for automatic adjustment of width (like in Rgui) +#flush + flush.console +#shell & shell.exec +#stderr, stdin, stdout +#interactive() +#utf8ToInt, intToUtf8 +#system, system.time +#pause (sm package) +#bringToTop +#dev.interactive +#graphics.off +#stayOnTop under Windows +#choose.dir +#choose.files +#chooseCRANmirror, install & update packages +#Data.entry, dataentry, de, edit, fix, fixInNamespace +#file.edit +#history +#page +#recover +#setWindowTitle under Windows +#winDialog, winDialogString under Windows +#winMenuXXXX under Windows +#gettext, ngettext, bindtextdomain +#readline functionnalities +#test command history with pgup/pgdwn Added: pkg/svSocket/inst/testCLI/testCLIcmd.R =================================================================== --- pkg/svSocket/inst/testCLI/testCLIcmd.R (rev 0) +++ pkg/svSocket/inst/testCLI/testCLIcmd.R 2014-03-02 11:56:59 UTC (rev 551) @@ -0,0 +1,144 @@ +## CLI torture test, copyright (c) Ph. Grosjean (phgrosjean at sciviews.org) +## GNU GPL => 2 license +## A series of commands to check for R CLI (or console widget) +## Version 1.0-0 + +## Simple instructions +1+1 # Simple command with one line of output +1:100 # Simple command with several lines of output +search() # Evaluation of a function +ls() # Idem... look if this function is evaluated in .GlobalEnv! + +## Multiple instructions on one line +1+1; 2+2 # Two successive prints +1+1; cat("test\n"); 2+2 # Print, cat, print +1+1; cat("test"); 2+2 # Idem, but cat without \n + +## Visible/invisible output +invisible(1) # Command with invisible result +a <- 1:10 # Idem +(a <- 1:10) # Idem, with visible output +for (i in 1:3) print(i) # Output within a loop +for (i in 1:3) i # Do not explicit use print(), so output nothing + +cat("test\n") # Simple text print with carriage return +cat("test") # Idem, but without carriage return + +## S4 objects +setClass("track", representation(x = "numeric", y = "numeric")) +setMethod("show", "track", function(object) {cat("track:\n"); print(object at x); print(object at y)}) +tr <- new("track", x = 1:3, y = 4:6) # invisible +(tr <- new("track", x = 1:3, y = 4:6)) # visible +tr # show it +show(tr) # idem +print(tr) # This is the same! + +## Special characters +cat("\ttabs\n") # \t (tabulation) should indent the text by 4 characters +cat("tesg\bt\n") # \b (backspace) erases previous character thus it print "test" +alarm() # idem as cat("\a"), should sound a bip + +## Code parsing and multiline commands +log) # Generate and error +1+1; log) # Should run first instruction before generating the error +## This is a partial line without comments (should issue the continue prompt) +log( +10) + +1 + +log( # This is partial with comments +10) + +search(); log( +10) + +log( # Issuing an empty line between instructions + +10) + +## String on several lines +text <- "some +text" +text # should print "some\ntext" + +## Idem, but with single quote +text <- 'some +text' +text # should print "some\ntext" + +## A horrible code with a variable name on two lines (but correct syntax)! +`var +1` <- 1 +`var\n1` + +## Truncation of very long output +options(max.print = 1000) # Put a lower limit +1:1100 # Should be truncated +options(max.print = NULL) # Restore default value + +## Errors messages +nonExistingVar +cos("a") +cos(nonExisting) +stop("Error!"); 1:3 # Error in .GlobalEnv (no call info) +(function() stop("Error!"))(); 1:3 # Error; second command not evaluated + +## Warnings handling (a little tricky!) +options(warn = -1) # Do not display warnings +{warning("Warn!"); 1:3} # Simple warning +{warning("Warn!", immediate. = TRUE); 1:3} # Should issue the warning anyway + +options(warn = 0) # Delay warning display +{warning("Warn!"); 1:3} # Simple delayed warning +{warning("Warn!", immediate. = TRUE); 1:3} # Do not delay warning +for (i in 1:3) {print(i); warning("test")} +for (i in 1:4) {print(i); warning("test", immediate. = (i < 3))} + +options(warn = 1) # Display warnings immediatelly +{warning("Warn!"); 1:3} + +options(warn = 2) # Every warning generates an error +{warning("Warn!"); 1:3} # Warning turned into an error +warnings() + + +## Warnings inside functions +options(warn = -1) +(function() {warning("Warn!"); 1:3})() +options(warn = 0) +(function() {warning("Warn!"); 1:3})() +options(warn = 1) +(function() {warning("Warn!"); 1:3})() +options(warn = 2) +(function() {warning("Warn!"); 1:3})() + +## Multiple warnings and/or errors (warn = 0 + 9, 10, 11, 49, 50 & 60 warnings) +options(warn = 0) +for (i in 1:9) warning("Warn ", i) +warnings() # Redisplay last warnings +for (i in 1:10) warning("Warn ", i) +warnings() +for (i in 1:11) warning("Warn ", i) +warnings() +for (i in 1:49) warning("Warn ", i) +warnings() +for (i in 1:50) warning("Warn ", i) +warnings() +for (i in 1:60) warning("Warn ", i) +warnings() + +## warning() and then, error message with warn = 0 ("In addition: ...") +options(warn = 0) +(function() {warning("Warn!"); stop("Error!"); 1:3})() +options(warn = 1) +(function() {warning("Warn!"); stop("Error!"); 1:3})() + +## Messages handling +{message("A message"); 1:3} # Should issue the message +simpleMessage("test") +simpleMessage("test", call = "me") + +## Multiline or very long message +options(warning.length = 100) +warning("A very long message for my warning that should be truncated or at least flowed on several lines, what does it gives here?") +warning("A multiline warning\nSecond line,\nThird line") Added: pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.out =================================================================== --- pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.out (rev 0) +++ pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.out 2014-03-02 11:56:59 UTC (rev 551) @@ -0,0 +1,543 @@ +> # CLI torture test, copyright (c) Ph. Grosjean (phgrosjean at sciviews.org) +> # GNU GPL => 2 license +> # A series of commands to check for R CLI (or console widget) +> # Version 1.0-0 +> +> ## Simple instructions +> 1+1 # Simple command with one line of output +[1] 2 +> 1:100 # Simple command with several lines of output + [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + [19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 + [37] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 + [55] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 + [73] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 + [91] 91 92 93 94 95 96 97 98 99 100 +> search() # Evaluation of a function + [1] ".GlobalEnv" "package:stats" "package:graphics" + [4] "package:grDevices" "package:utils" "package:datasets" + [7] "package:methods" "TempEnv" "Autoloads" +[10] "package:base" +> ls() # Idem... look if this function is evaluated in .GlobalEnv! + [1] "Parse" "TempEnv_" "capture.all" + [4] "closeSocketClients" "cmd" "cmd0" + [7] "cmdfile" "getSocketClients" "getSocketClientsNames" +[10] "getSocketServerName" "getSocketServers" "gettext_" +[13] "gettextf_" "i" "out" +[16] "outfile" "processSocket" "res" +[19] "sendSocketClients" "startSocketServer" "stopSocketServer" +> +> ## Multiple instructions on one line +> 1+1; 2+2 # Two successive prints +[1] 2 +[1] 4 +> 1+1; cat("test\n"); 2+2 # Print, cat, print +[1] 2 +test +[1] 4 +> 1+1; cat("test"); 2+2 # Idem, but cat without \n +[1] 2 +test[1] 4 +> +> ## Visible/invisible output +> invisible(1) # Command with invisible result +> a <- 1:10 # Idem +> (a <- 1:10) # Idem, with visible output + [1] 1 2 3 4 5 6 7 8 9 10 +> for (i in 1:3) print(i) # Output within a loop +[1] 1 +[1] 2 +[1] 3 +> for (i in 1:3) i # Do not explicit use print(), so output nothing +> +> cat("test\n") # Simple text print with carriage return +test +> cat("test") # Idem, but without carriage return +test> +> ## S4 objects +> setClass("track", representation(x = "numeric", y = "numeric")) +[1] "track" +> setMethod("show", "track", function(object) {cat("track:\n"); print(object at x); print(object at y)}) +[1] "show" +> tr <- new("track", x = 1:3, y = 4:6) # invisible +> (tr <- new("track", x = 1:3, y = 4:6)) # visible +track: +[1] 1 2 3 +[1] 4 5 6 +> tr # show it +track: +[1] 1 2 3 +[1] 4 5 6 +> show(tr) # idem +track: +[1] 1 2 3 +[1] 4 5 6 +> print(tr) # This is the same! +track: +[1] 1 2 3 +[1] 4 5 6 +> +> ## Special characters +> cat("\ttabs\n") # \t (tabulation) should indent the text by 4 characters + tabs +> cat("tesg\bt\n") # \b (backspace) erases previous character thus it print "test" +tesgt +> alarm() # idem as cat("\a"), should sound a bip +> +> ## Code parsing and multiline commands +> log) # Generate and error +Erreur : ')' inattendu `a log) +> 1+1; log) # Should run first instruction before generating the error +Erreur : ')' inattendu `a 1+1; log) +> # This is a partial line without comments (should issue the continue prompt) +> log( ++ 10) + ++ 1 +[1] 3.302585 +> +> log( # This is partial with comments ++ 10) +[1] 2.302585 +> +> search(); log( ++ 10) + [1] ".GlobalEnv" "package:stats" "package:graphics" + [4] "package:grDevices" "package:utils" "package:datasets" + [7] "package:methods" "TempEnv" "Autoloads" +[10] "package:base" +[1] 2.302585 +> +> log( # Issuing an empty line between instructions ++ ++ 10) +[1] 2.302585 +> +> # String on several lines +> text <- "some ++ text" +> text # should print "some\ntext" +[1] "some\ntext" +> +> # Idem, but with single quote +> text <- 'some ++ text' +> text # should print "some\ntext" +[1] "some\ntext" +> +> # A horrible code with a variable name on two lines (but correct syntax)! +> `var ++ 1` <- 1 +> `var\n1` +[1] 1 +> +> ## Truncation of very long output +> options(max.print = 1000) # Put a lower limit +> 1:1100 # Should be truncated + [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 + [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 + [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 + [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 + [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 + [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 + [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 + [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 + [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 + [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154 + [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 + [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182 + [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196 + [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210 + [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224 + [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238 + [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252 + [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266 + [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280 + [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 + [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308 + [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322 + [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336 + [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350 + [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364 + [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378 + [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392 + [393] 393 394 395 396 397 398 399 400 401 402 403 404 405 406 + [407] 407 408 409 410 411 412 413 414 415 416 417 418 419 420 + [421] 421 422 423 424 425 426 427 428 429 430 431 432 433 434 + [435] 435 436 437 438 439 440 441 442 443 444 445 446 447 448 + [449] 449 450 451 452 453 454 455 456 457 458 459 460 461 462 + [463] 463 464 465 466 467 468 469 470 471 472 473 474 475 476 + [477] 477 478 479 480 481 482 483 484 485 486 487 488 489 490 + [491] 491 492 493 494 495 496 497 498 499 500 501 502 503 504 + [505] 505 506 507 508 509 510 511 512 513 514 515 516 517 518 + [519] 519 520 521 522 523 524 525 526 527 528 529 530 531 532 + [533] 533 534 535 536 537 538 539 540 541 542 543 544 545 546 + [547] 547 548 549 550 551 552 553 554 555 556 557 558 559 560 + [561] 561 562 563 564 565 566 567 568 569 570 571 572 573 574 + [575] 575 576 577 578 579 580 581 582 583 584 585 586 587 588 + [589] 589 590 591 592 593 594 595 596 597 598 599 600 601 602 + [603] 603 604 605 606 607 608 609 610 611 612 613 614 615 616 + [617] 617 618 619 620 621 622 623 624 625 626 627 628 629 630 + [631] 631 632 633 634 635 636 637 638 639 640 641 642 643 644 + [645] 645 646 647 648 649 650 651 652 653 654 655 656 657 658 + [659] 659 660 661 662 663 664 665 666 667 668 669 670 671 672 + [673] 673 674 675 676 677 678 679 680 681 682 683 684 685 686 + [687] 687 688 689 690 691 692 693 694 695 696 697 698 699 700 + [701] 701 702 703 704 705 706 707 708 709 710 711 712 713 714 + [715] 715 716 717 718 719 720 721 722 723 724 725 726 727 728 + [729] 729 730 731 732 733 734 735 736 737 738 739 740 741 742 + [743] 743 744 745 746 747 748 749 750 751 752 753 754 755 756 + [757] 757 758 759 760 761 762 763 764 765 766 767 768 769 770 + [771] 771 772 773 774 775 776 777 778 779 780 781 782 783 784 + [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798 + [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812 + [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826 + [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840 + [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854 + [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868 + [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882 + [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896 + [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910 + [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924 + [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938 + [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952 + [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966 + [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980 + [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994 + [995] 995 996 997 998 999 1000 + [ reached getOption("max.print") -- omitted 100 entries ]] +> options(max.print = NULL) # Restore default value +> +> ## Errors messages +> nonExistingVar +Erreur : objet "nonExistingVar" non trouv'e +> cos("a") +Error in cos("a") : + Argument non num'erique pour une fonction math'ematique +> cos(nonExisting) +Erreur : objet "nonExisting" non trouv'e +> stop("Error!"); 1:3 # Error in .GlobalEnv (no call info) +Erreur : Error! +> (function() stop("Error!"))(); 1:3 # Error; second command not evaluated +Error in (function() stop("Error!"))() : Error! +> +> ## Warnings handling (a little tricky!) +> options(warn = -1) # Do not display warnings +> {warning("Warn!"); 1:3} # Simple warning +[1] 1 2 3 +> {warning("Warn!", immediate. = TRUE); 1:3} # Should issue the warning anyway +Avis : Warn! +[1] 1 2 3 +> +> options(warn = 0) # Delay warning display +> {warning("Warn!"); 1:3} # Simple delayed warning +[1] 1 2 3 +Message d'avis : +Warn! +> {warning("Warn!", immediate. = TRUE); 1:3} # Do not delay warning +Avis : Warn! +[1] 1 2 3 +> for (i in 1:3) {print(i); warning("test")} +[1] 1 +[1] 2 +[1] 3 +Messages d'avis : +1: test +2: test +3: test +> for (i in 1:4) {print(i); warning("test", immediate. = (i < 3))} +[1] 1 +Avis : test +[1] 2 +Avis : test +[1] 3 +[1] 4 +Messages d'avis : +1: test +2: test +> +> options(warn = 1) # Display warnings immediatelly +> {warning("Warn!"); 1:3} +Avis : Warn! +[1] 1 2 3 +> +> options(warn = 2) # Every warning generates an error +> {warning("Warn!"); 1:3} # Warning turned into an error +Erreur : (converti depuis l'avis) Warn! +> warnings() +Messages d'avis : +1: test +2: test +> +> +> ## Warnings inside functions +> options(warn = -1) +> (function() {warning("Warn!"); 1:3})() +[1] 1 2 3 +> options(warn = 0) +> (function() {warning("Warn!"); 1:3})() +[1] 1 2 3 +Message d'avis : +In (function() { ... : Warn! +> options(warn = 1) +> (function() {warning("Warn!"); 1:3})() +Avis dans (function() { : Warn! +[1] 1 2 3 +> options(warn = 2) +> (function() {warning("Warn!"); 1:3})() +Error in (function() { : (converti depuis l'avis) Warn! +> +> ## Multiple warnings and/or errors (warn = 0 + 9, 10, 11, 49, 50 & 60 warnings) +> options(warn = 0) +> for (i in 1:9) warning("Warn ", i) +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +> warnings() # Redisplay last warnings +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +> for (i in 1:10) warning("Warn ", i) +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +> warnings() +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +> for (i in 1:11) warning("Warn ", i) +Il y a eu 11 avis (utilisez warnings() pour les visionner) +> warnings() +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +11: Warn 11 +> for (i in 1:49) warning("Warn ", i) +Il y a eu 49 avis (utilisez warnings() pour les visionner) +> warnings() +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +11: Warn 11 +12: Warn 12 +13: Warn 13 +14: Warn 14 +15: Warn 15 +16: Warn 16 +17: Warn 17 +18: Warn 18 +19: Warn 19 +20: Warn 20 +21: Warn 21 +22: Warn 22 +23: Warn 23 +24: Warn 24 +25: Warn 25 +26: Warn 26 +27: Warn 27 +28: Warn 28 +29: Warn 29 +30: Warn 30 +31: Warn 31 +32: Warn 32 +33: Warn 33 +34: Warn 34 +35: Warn 35 +36: Warn 36 +37: Warn 37 +38: Warn 38 +39: Warn 39 +40: Warn 40 +41: Warn 41 +42: Warn 42 +43: Warn 43 +44: Warn 44 +45: Warn 45 +46: Warn 46 +47: Warn 47 +48: Warn 48 +49: Warn 49 +> for (i in 1:50) warning("Warn ", i) +Il y a eu 50 avis ou plus (utilisez warnings() pour voir les 50 premiers) +> warnings() +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +11: Warn 11 +12: Warn 12 +13: Warn 13 +14: Warn 14 +15: Warn 15 +16: Warn 16 +17: Warn 17 +18: Warn 18 +19: Warn 19 +20: Warn 20 +21: Warn 21 +22: Warn 22 +23: Warn 23 +24: Warn 24 +25: Warn 25 +26: Warn 26 +27: Warn 27 +28: Warn 28 +29: Warn 29 +30: Warn 30 +31: Warn 31 +32: Warn 32 +33: Warn 33 +34: Warn 34 +35: Warn 35 +36: Warn 36 +37: Warn 37 +38: Warn 38 +39: Warn 39 +40: Warn 40 +41: Warn 41 +42: Warn 42 +43: Warn 43 +44: Warn 44 +45: Warn 45 +46: Warn 46 +47: Warn 47 +48: Warn 48 +49: Warn 49 +50: Warn 50 +> for (i in 1:60) warning("Warn ", i) +Il y a eu 50 avis ou plus (utilisez warnings() pour voir les 50 premiers) +> warnings() +Messages d'avis : +1: Warn 1 +2: Warn 2 +3: Warn 3 +4: Warn 4 +5: Warn 5 +6: Warn 6 +7: Warn 7 +8: Warn 8 +9: Warn 9 +10: Warn 10 +11: Warn 11 +12: Warn 12 +13: Warn 13 +14: Warn 14 +15: Warn 15 +16: Warn 16 +17: Warn 17 +18: Warn 18 +19: Warn 19 +20: Warn 20 +21: Warn 21 +22: Warn 22 +23: Warn 23 +24: Warn 24 +25: Warn 25 +26: Warn 26 +27: Warn 27 +28: Warn 28 +29: Warn 29 +30: Warn 30 +31: Warn 31 +32: Warn 32 +33: Warn 33 +34: Warn 34 +35: Warn 35 +36: Warn 36 +37: Warn 37 +38: Warn 38 +39: Warn 39 +40: Warn 40 +41: Warn 41 +42: Warn 42 +43: Warn 43 +44: Warn 44 +45: Warn 45 +46: Warn 46 +47: Warn 47 +48: Warn 48 +49: Warn 49 +50: Warn 50 +> +> # warning and then, error message with warn = 0 ("In addition: ...") +> options(warn = 0) +> (function() {warning("Warn!"); stop("Error!"); 1:3})() +Error in (function() { : Error! +De plus : Message d'avis : +In (function() { ... : Warn! +> options(warn = 1) +> (function() {warning("Warn!"); stop("Error!"); 1:3})() +Avis dans (function() { : Warn! +Error in (function() { : Error! +> +> ## Messages handling +> {message("A message"); 1:3} # Should issue the message +A message +[1] 1 2 3 +> simpleMessage("test") + +> simpleMessage("test", call = "me") + +> +> ## Multiline or very long message +> options(warning.length = 100) +> warning("A very long message for my warning that should be truncated or at least flowed on several lines, what does it gives here?") +Avis : A very long message for my warning that should be truncated or at least flowed on several lines, wha [... truncated] +> warning("A multiline warning\nSecond line,\nThird line") +Avis : A multiline warning +Second line, +Third line +> \ No newline at end of file Added: pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.save =================================================================== --- pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.save (rev 0) +++ pkg/svSocket/inst/testCLI/testCLIcmd_RMacTermFR.save 2014-03-02 11:56:59 UTC (rev 551) @@ -0,0 +1,544 @@ +> # CLI torture test, copyright (c) Ph. Grosjean (phgrosjean at sciviews.org) +> # GNU GPL => 2 license +> # A series of commands to check for R CLI (or console widget) +> # Version 1.0-0 +> +> ## Simple instructions +> 1+1 # Simple command with one line of output +[1] 2 +> 1:100 # Simple command with several lines of output + [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + [19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 + [37] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 + [55] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 + [73] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 + [91] 91 92 93 94 95 96 97 98 99 100 +> search() # Evaluation of a function + [1] ".GlobalEnv" "package:stats" "package:graphics" + [4] "package:grDevices" "package:utils" "package:datasets" + [7] "package:methods" "TempEnv" "Autoloads" +[10] "package:base" +> ls() # Idem... look if this function is evaluated in .GlobalEnv! + [1] "Parse" "TempEnv_" "capture.all" + [4] "closeSocketClients" "cmd" "cmd0" + [7] "cmdfile" "getSocketClients" "getSocketClientsNames" +[10] "getSocketServerName" "getSocketServers" "gettext_" +[13] "gettextf_" "i" "out" +[16] "outfile" "processSocket" "res" +[19] "sendSocketClients" "startSocketServer" "stopSocketServer" +> +> ## Multiple instructions on one line +> 1+1; 2+2 # Two successive prints +[1] 2 +[1] 4 +> 1+1; cat("test\n"); 2+2 # Print, cat, print +[1] 2 +test +[1] 4 +> 1+1; cat("test"); 2+2 # Idem, but cat without \n +[1] 2 +test[1] 4 +> +> ## Visible/invisible output +> invisible(1) # Command with invisible result +> a <- 1:10 # Idem +> (a <- 1:10) # Idem, with visible output + [1] 1 2 3 4 5 6 7 8 9 10 +> for (i in 1:3) print(i) # Output within a loop +[1] 1 +[1] 2 +[1] 3 +> for (i in 1:3) i # Do not explicit use print(), so output nothing +> +> cat("test\n") # Simple text print with carriage return +test +> cat("test") # Idem, but without carriage return +test> +> ## S4 objects +> setClass("track", representation(x = "numeric", y = "numeric")) +[1] "track" +> setMethod("show", "track", function(object) {cat("track:\n"); print(object at x); print(object at y)}) +[1] "show" +> tr <- new("track", x = 1:3, y = 4:6) # invisible +> (tr <- new("track", x = 1:3, y = 4:6)) # visible +track: +[1] 1 2 3 +[1] 4 5 6 +> tr # show it +track: +[1] 1 2 3 +[1] 4 5 6 +> show(tr) # idem +track: +[1] 1 2 3 +[1] 4 5 6 +> print(tr) # This is the same! +track: +[1] 1 2 3 +[1] 4 5 6 +> +> ## Special characters +> cat("\ttabs\n") # \t (tabulation) should indent the text by 4 characters + tabs +> cat("tesg\bt\n") # \b (backspace) erases previous character thus it print "test" +test +> alarm() # idem as cat("\a"), should sound a bip +> +> ## Code parsing and multiline commands +> log) # Generate and error +Erreur : ')' inattendu dans "log)" +> 1+1; log) # Should run first instruction before generating the error +[1] 2 +Erreur : ')' inattendu dans " log)" +> # This is a partial line without comments (should issue the continue prompt) +> log( ++ 10) + ++ 1 +[1] 3.302585 +> +> log( # This is partial with comments ++ 10) +[1] 2.302585 +> +> search(); log( + [1] ".GlobalEnv" "package:stats" "package:graphics" + [4] "package:grDevices" "package:utils" "package:datasets" + [7] "package:methods" "TempEnv" "Autoloads" +[10] "package:base" ++ 10) +[1] 2.302585 +> +> log( # Issuing an empty line between instructions ++ ++ 10) +[1] 2.302585 +> +> # String on several lines +> text <- "some ++ text" +> text # should print "some\ntext" +[1] "some\ntext" +> +> # Idem, but with single quote +> text <- 'some ++ text' +> text # should print "some\ntext" +[1] "some\ntext" +> +> # A horrible code with a variable name on two lines (but correct syntax)! +> `var ++ 1` <- 1 +> `var\n1` +[1] 1 +> +> ## Truncation of very long output +> options(max.print = 1000) # Put a lower limit +> 1:1100 # Should be truncated + [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 + [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42 + [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 + [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70 + [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 + [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98 + [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112 + [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 + [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 + [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154 + [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168 + [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182 + [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196 + [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210 + [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224 + [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238 + [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252 + [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266 + [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280 + [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294 + [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308 + [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322 + [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336 + [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350 + [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364 + [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378 + [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392 [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/sciviews -r 551 From noreply at r-forge.r-project.org Sun Mar 2 13:31:56 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 2 Mar 2014 13:31:56 +0100 (CET) Subject: [Sciviews-commits] r552 - in pkg/svIDE: . R man Message-ID: <20140302123156.6F7D5186F88@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-02 13:31:56 +0100 (Sun, 02 Mar 2014) New Revision: 552 Modified: pkg/svIDE/DESCRIPTION pkg/svIDE/NEWS pkg/svIDE/R/createCallTipFile.R pkg/svIDE/R/guiDDEInstall.R pkg/svIDE/man/guiDDEInstall.Rd Log: svIDE updated to changes in svMisc (CallTip -> callTip & Complete -> completion) Modified: pkg/svIDE/DESCRIPTION =================================================================== --- pkg/svIDE/DESCRIPTION 2014-03-02 11:56:59 UTC (rev 551) +++ pkg/svIDE/DESCRIPTION 2014-03-02 12:31:56 UTC (rev 552) @@ -1,6 +1,6 @@ Package: svIDE Type: Package -Version: 0.9-51 +Version: 0.9-52 Date: 2014-03-02 Title: SciViews GUI API - IDE and code editor functions Author: Philippe Grosjean [aut, cre] Modified: pkg/svIDE/NEWS =================================================================== --- pkg/svIDE/NEWS 2014-03-02 11:56:59 UTC (rev 551) +++ pkg/svIDE/NEWS 2014-03-02 12:31:56 UTC (rev 552) @@ -1,5 +1,12 @@ = svIDE News +== Changes in svIDE 0.9-52 + +* createCallTipFile(), guiiCallTip() & guiComplete() adapted to new functions + names in svMisc (CallTip -> callTip & Complete -> completion). Man pages are + also adapted accordingly. + + == Changes in svIDE 0.9-51 * Rework of the Author and Athours at R fields in the DESCRIPTION file. Modified: pkg/svIDE/R/createCallTipFile.R =================================================================== --- pkg/svIDE/R/createCallTipFile.R 2014-03-02 11:56:59 UTC (rev 551) +++ pkg/svIDE/R/createCallTipFile.R 2014-03-02 12:31:56 UTC (rev 552) @@ -9,7 +9,7 @@ ## For each keyword, write a line in the file with keyword=calltip for (key in keys) { - ctip <- CallTip(key, only.args = only.args) + ctip <- callTip(key, only.args = only.args) if (ctip != "") { if (return.location == TRUE) { ## Get the package from where it is located and append it Modified: pkg/svIDE/R/guiDDEInstall.R =================================================================== --- pkg/svIDE/R/guiDDEInstall.R 2014-03-02 11:56:59 UTC (rev 551) +++ pkg/svIDE/R/guiDDEInstall.R 2014-03-02 12:31:56 UTC (rev 552) @@ -11,7 +11,7 @@ width <- as.integer(width[1]) ## Get the call tip - ctip <- CallTip(code, only.args = onlyargs, location = location) + ctip <- callTip(code, only.args = onlyargs, location = location) ## Possibly break long lines at reasonables widths if (onlyargs) Exdent <- 0 else Exdent <- 4 @@ -48,7 +48,7 @@ sep = sep[1] # Get the completion list - clist <- Complete(code, sep = sep) + clist <- completion(code, sep = sep) # Copy the result to a Tcl variable .Tcl(paste("set ::SciViewsR_Complete {", clist, "}", sep = "")) Modified: pkg/svIDE/man/guiDDEInstall.Rd =================================================================== --- pkg/svIDE/man/guiDDEInstall.Rd 2014-03-02 11:56:59 UTC (rev 551) +++ pkg/svIDE/man/guiDDEInstall.Rd 2014-03-02 12:31:56 UTC (rev 552) @@ -42,7 +42,7 @@ then that IDE is automatically started afterward. } -\seealso{ \code{\link[svMisc]{CallTip}}, \code{\link[svMisc]{Complete}} } +\seealso{ \code{\link[svMisc]{callTip}}, \code{\link[svMisc]{completion}} } \examples{ \dontrun{ From noreply at r-forge.r-project.org Sun Mar 9 10:28:17 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 9 Mar 2014 10:28:17 +0100 (CET) Subject: [Sciviews-commits] r553 - komodo/SciViews-K komodo/SciViews-K/components komodo/SciViews-K/udl pkg/svDoc pkg/svDoc/R pkg/svDoc/inst/asciidoc pkg/svDoc/inst/asciidoc/dblatex pkg/svDoc/inst/asciidoc/docbook-xsl pkg/svDoc/inst/asciidoc/filters/code pkg/svDoc/inst/asciidoc/filters/source pkg/svDoc/inst/asciidoc/images pkg/svDoc/inst/asciidoc/images/icons pkg/svDoc/inst/asciidoc/images/icons/callouts pkg/svDoc/inst/asciidoc/javascripts pkg/svDoc/inst/asciidoc/stylesheets pkg/svDoc/inst/asciidoc/themes/sciviews pkg/svDoc/man pkg/svIDE/R Message-ID: <20140309092817.DE5541869E5@r-forge.r-project.org> Author: phgrosjean Date: 2014-03-09 10:28:16 +0100 (Sun, 09 Mar 2014) New Revision: 553 Added: pkg/svDoc/inst/asciidoc/a2x.py pkg/svDoc/inst/asciidoc/asciidocapi.py pkg/svDoc/inst/asciidoc/dblatex/ pkg/svDoc/inst/asciidoc/dblatex/asciidoc-dblatex.sty pkg/svDoc/inst/asciidoc/dblatex/asciidoc-dblatex.xsl pkg/svDoc/inst/asciidoc/dblatex/dblatex-readme.txt pkg/svDoc/inst/asciidoc/docbook-xsl/ pkg/svDoc/inst/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt pkg/svDoc/inst/asciidoc/docbook-xsl/chunked.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/common.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/epub.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/fo.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/htmlhelp.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/manpage.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/text.xsl pkg/svDoc/inst/asciidoc/docbook-xsl/xhtml.xsl pkg/svDoc/inst/asciidoc/docbook45.conf pkg/svDoc/inst/asciidoc/images/ pkg/svDoc/inst/asciidoc/images/icons/ pkg/svDoc/inst/asciidoc/images/icons/callouts/ pkg/svDoc/inst/asciidoc/images/icons/callouts/1.png pkg/svDoc/inst/asciidoc/images/icons/callouts/10.png pkg/svDoc/inst/asciidoc/images/icons/callouts/11.png pkg/svDoc/inst/asciidoc/images/icons/callouts/12.png pkg/svDoc/inst/asciidoc/images/icons/callouts/13.png pkg/svDoc/inst/asciidoc/images/icons/callouts/14.png pkg/svDoc/inst/asciidoc/images/icons/callouts/15.png pkg/svDoc/inst/asciidoc/images/icons/callouts/2.png pkg/svDoc/inst/asciidoc/images/icons/callouts/3.png pkg/svDoc/inst/asciidoc/images/icons/callouts/4.png pkg/svDoc/inst/asciidoc/images/icons/callouts/5.png pkg/svDoc/inst/asciidoc/images/icons/callouts/6.png pkg/svDoc/inst/asciidoc/images/icons/callouts/7.png pkg/svDoc/inst/asciidoc/images/icons/callouts/8.png pkg/svDoc/inst/asciidoc/images/icons/callouts/9.png pkg/svDoc/inst/asciidoc/images/icons/home.png pkg/svDoc/inst/asciidoc/images/icons/next.png pkg/svDoc/inst/asciidoc/images/icons/prev.png pkg/svDoc/inst/asciidoc/images/icons/up.png pkg/svDoc/inst/asciidoc/lang-cs.conf pkg/svDoc/inst/asciidoc/lang-ro.conf pkg/svDoc/inst/asciidoc/main.aap pkg/svDoc/inst/asciidoc/stylesheets/docbook-xsl.css pkg/svDoc/inst/asciidoc/stylesheets/pygmentsGithub.css pkg/svDoc/inst/asciidoc/stylesheets/pygmentsSciViews.css Removed: pkg/svDoc/inst/asciidoc/wordpress.conf Modified: komodo/SciViews-K/components/koRwiki_UDL_Language.py komodo/SciViews-K/install.rdf komodo/SciViews-K/udl/wikilex.udl pkg/svDoc/DESCRIPTION pkg/svDoc/NEWS pkg/svDoc/R/asciidoc.R pkg/svDoc/R/svDoc-internal.R pkg/svDoc/TODO pkg/svDoc/inst/asciidoc/CHANGELOG.txt pkg/svDoc/inst/asciidoc/README.txt pkg/svDoc/inst/asciidoc/asciidoc.conf pkg/svDoc/inst/asciidoc/asciidoc.py pkg/svDoc/inst/asciidoc/filters/code/code-filter.py pkg/svDoc/inst/asciidoc/filters/source/source-highlight-filter.conf pkg/svDoc/inst/asciidoc/help.conf pkg/svDoc/inst/asciidoc/html4.conf pkg/svDoc/inst/asciidoc/html5.conf pkg/svDoc/inst/asciidoc/javascripts/ASCIIMathML.js pkg/svDoc/inst/asciidoc/stylesheets/asciidoc.css pkg/svDoc/inst/asciidoc/stylesheets/pygments.css pkg/svDoc/inst/asciidoc/themes/sciviews/sciviews.css pkg/svDoc/inst/asciidoc/xhtml11.conf pkg/svDoc/man/svDoc-package.Rd pkg/svIDE/R/guiDDEInstall.R Log: svDoc towards markdown/Asciidoc mix Ascidoc upgrade to 8.6.9 Modified: komodo/SciViews-K/components/koRwiki_UDL_Language.py =================================================================== --- komodo/SciViews-K/components/koRwiki_UDL_Language.py 2014-03-02 12:31:56 UTC (rev 552) +++ komodo/SciViews-K/components/koRwiki_UDL_Language.py 2014-03-09 09:28:16 UTC (rev 553) @@ -62,7 +62,7 @@ # ------------ Commenting Controls ------------ # commentDelimiterInfo = { - "line": [ "#", ], + "line": [ "//", ], } # ------------ Indentation Controls ------------ # @@ -115,7 +115,7 @@ sample = """== A h2 title -A paragraph of text with **bold** and ,,italic,, text... +A paragraph of text with **bold** and __italic_ text... * Item 1, * Item 2 Modified: komodo/SciViews-K/install.rdf =================================================================== --- komodo/SciViews-K/install.rdf 2014-03-02 12:31:56 UTC (rev 552) +++ komodo/SciViews-K/install.rdf 2014-03-09 09:28:16 UTC (rev 553) @@ -5,7 +5,7 @@ true sciviewsk at sciviews.org SciViews-K - 0.9.33 + 0.9.34 Edit R code with Komodo Philippe Grosjean Romain Francois Modified: komodo/SciViews-K/udl/wikilex.udl =================================================================== --- komodo/SciViews-K/udl/wikilex.udl 2014-03-02 12:31:56 UTC (rev 552) +++ komodo/SciViews-K/udl/wikilex.udl 2014-03-09 09:28:16 UTC (rev 553) @@ -66,23 +66,61 @@ #SCE_UDL_M_COMMENT # SGML comments. +# Set the basic patterns we'll be using for styling transitions. +pattern WCHAR = 'a-zA-Z\d\x80-\xff' # characters in words +pattern WS = '\s\t\r\n' # whitespace +pattern OP = '!%&\(\)\*\+,-\/:;<=>\?@\[\]\^\{\}~|\$' # operator + + state IN_M_WIKI_START /^/ : => in_wiki_default_start_of_line /./: redo, => in_wiki_default_on_line state in_wiki_default_start_of_line: #'{{{' : paint(upto, M_DEFAULT), paint(include, M_TAGNAME), => in_wiki_triple_brace_start -'##': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment +'//': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment -# This is for the item list -# NO'- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +# Ruler +/^[ \t]*-{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line +/^[ \t]*(- ){2,}-[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line +/^[ \t]*\*{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line +/^[ \t]*_{3}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line +/^[ \t]*(\* ){2,}\*[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line +# Page break +/^[ \t]*<{3,}[ \t]*$/: paint(upto, M_CDATA), paint(include, M_PI), => in_wiki_default_on_line + +# Special characters (c), (r), (tm), ..., --, ---, 1/2, 1/4, 3/4 +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +/(? in_wiki_default_on_line +"\\\\.": paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line + +# This is for unordered list '* ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '*** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '**** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '***** ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line -# This is for the numbered list +'+ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'+++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'++++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'+++++ ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line + +'- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'-- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'--- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'---- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +'----- ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line + +# This is for the ordered list '. ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '.. ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line '... ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line @@ -94,11 +132,12 @@ /[ivx]+\) /: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line /[IVX]+\) /: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line -'===== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header -'==== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header -'=== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header -'== ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header -'= ': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'######': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'#####': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'####': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'###': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'##': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header +'#': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header '.': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_finish_header # This is for special paragraphs @@ -108,6 +147,10 @@ 'CAUTION:': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line 'TIP:': paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line +# Markdown quote style (> quoted text) is not handled correctly in Asciidoc +# Just highlight quotes as tags however, here +/>[> \t]+/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_on_line + # Everything between [] on the beginning of a line, or with name;; name:: name::: name:::: is tag /\[.*\]$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line /[a-zA-Z][a-zA-Z _0-9]+;;$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line @@ -116,30 +159,35 @@ /./: redo, => in_wiki_default_on_line state in_wiki_finish_header: -/$/ : paint(upto, M_PI), paint(include, M_PI), => in_wiki_default_start_of_line -#/\s+/ : #stay -#'##': paint(upto, M_PI), paint(include, M_COMMENT), => in_wiki_have_comment -#/./: redo, => in_wiki_default_on_line +/#*$/ : paint(upto, M_PI), paint(include, M_TAGNAME), => in_wiki_default_start_of_line state in_wiki_default_on_line: #'##': paint(upto, M_CDATA), paint(include, M_COMMENT), => in_wiki_have_comment -# Line break with + -/ \+$/: paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_default_start_of_line +# Line break with + (asciidoc style) +/ +\+[$WS]*$/: paint(upto, M_CDATA), paint(include, SSL_STRING), => in_wiki_default_on_line +/( |\t)[$WS]*$/: paint(upto, M_CDATA), paint(include, SSL_STRING), => in_wiki_default_on_line +# Line break with 2 sp, 1 tab or more (markdown style) /$/: => in_wiki_default_start_of_line -",," : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_italic -"**" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold +"__" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold1 +/(? in_wiki_italic1 +"**" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_bold2 +/(? in_wiki_italic2 +"~~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_del ## TODO: use a different language here... may be latex or latexequation? "+++$$" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_equation -"$$" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code +/^```+[a-zA-Z0-9]*$/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_literal +/``[\s\t]+/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code1 +/``(?![`\s\t])/ : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code2 +"`" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_code3 "+++" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_passthrough -"~~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_monospaced +"++" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_monospaced #"'''''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q5 #"'''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q3 #"''" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_q2 -"__" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_subscript -"^^" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_superscript +"~" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_subscript +"^" : paint(upto, M_CDATA), paint(include, M_TAGNAME), => in_wiki_superscript '{{{' : paint(upto, M_CDATA), => in_wiki_brace_3 /!'+/: #stay @@ -189,31 +237,65 @@ #{{{ in-line things -state in_wiki_italic: -# We don't want to transit from italic stage for URLs like http://xxx -/!,,/: #stay -## TODO: allow for other in-line things inside this! -",," : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line +state in_wiki_bold1: +/!\__/: #stay +"__" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line -state in_wiki_bold: +state in_wiki_bold2: /!\**/: #stay -"**" : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line +"**" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line +state in_wiki_italic1: +/!_/: #stay +"_" : redo, => in_wiki_italic1_transition + +state in_wiki_italic1_transition: +/_(?=[$WCHAR])/: => in_wiki_italic1 +/_(?![$WCHAR])/: paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line + +state in_wiki_italic2: +/!\*/: #stay +"*" : redo, => in_wiki_italic2_transition + +state in_wiki_italic2_transition: +/\*(?=[$WCHAR])/: => in_wiki_italic2 +/\*(?![$WCHAR])/: paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line + +state in_wiki_del: +/!\~~/: #stay +"~~" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line + state in_wiki_equation: /!\$$+++/: #stay -"$$+++" : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line +"$$+++" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line -state in_wiki_code: -/!\$$/: #stay -"$$" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line +state in_wiki_literal: +/!\^/: #stay +/^/ : paint(upto, M_TAGNAME), paint(include, M_TAGNAME), => in_wiki_literal_code +state in_wiki_literal_code: +/!\^```+$/: #stay +/^```+$/ : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line + +state in_wiki_code1: +/!\[\s\t]+``/: #stay +/[\s\t]+``/ : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line + +state in_wiki_code2: +/!\``/: #stay +"``" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line + +state in_wiki_code3: +/!\`/: #stay +"`" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line + state in_wiki_passthrough: /!\+++/: #stay "+++" : paint(upto, SSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line state in_wiki_monospaced: -/!\~~/: #stay -"~~" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line +/!\++/: #stay +"++" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line #state in_wiki_q5: #/!'+/: #stay @@ -226,11 +308,11 @@ #"''" : paint(upto, CSL_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line state in_wiki_subscript: -/!__/: #stay -"__" : paint(upto, M_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line +/!~/: #stay +"~" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line state in_wiki_superscript: -/!^^/: #stay -"^^" : paint(upto, M_STRING), paint(include, M_TAGNAME), => in_wiki_default_on_line +/!^/: #stay +"^" : paint(upto, M_ATTRNAME), paint(include, M_TAGNAME), => in_wiki_default_on_line #}}} ################ End of State Handling ################ Modified: pkg/svDoc/DESCRIPTION =================================================================== --- pkg/svDoc/DESCRIPTION 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/DESCRIPTION 2014-03-09 09:28:16 UTC (rev 553) @@ -1,7 +1,7 @@ Package: svDoc Type: Package -Version: 0.9-9 -Date: 2013-09-21 +Version: 0.9-10 +Date: 2014-03-03 Title: SciViews GUI API - svDoc functions Author: Philippe Grosjean [aut, cre] Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"), @@ -11,6 +11,6 @@ Imports: utils SystemRequirements: Python (>= 2.4) to run Asciidoc (http://www.python.org/) Description: Supporting functions for the GUI API (SciViews documents management) -License: file LICENSE +License: GPL (>= 2) URL: http://www.sciviews.org/SciViews-R BugReports: https://r-forge.r-project.org/tracker/?group_id=194 Modified: pkg/svDoc/NEWS =================================================================== --- pkg/svDoc/NEWS 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/NEWS 2014-03-09 09:28:16 UTC (rev 553) @@ -1,5 +1,10 @@ = svDoc News +== Changes in svDoc 0.9-10 + +* AsciiDoc updates to version 8.6.9 (november 2013) + + == Changes in svDoc 0.9-9 * Detection of python, internal function .python(), sometimes failed. Corrected. Modified: pkg/svDoc/R/asciidoc.R =================================================================== --- pkg/svDoc/R/asciidoc.R 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/R/asciidoc.R 2014-03-09 09:28:16 UTC (rev 553) @@ -7,6 +7,7 @@ svDocToRnw <- function (svDocFile, RnwFile, encoding) { ## Converts a SciViews doc into an sweave document (.Rnw) + ## with Asciidoc formatting (also convert markdown to Asccidoc) ## If svDocFile is missing, try to get it from option or the command line if (missing(svDocFile)) svDocFile <- .svDocFile() @@ -55,17 +56,151 @@ ## Text chunks are lines where cstart > cend inDoc <- cstart > cend + #### Conversion markdown into asciidoc formattings + #### Titles + ## Asciidoc does not support H6. Transform it into block .title +# Rscript[inDoc] <- sub('^######[ \t]*([^#]+)#*$', '.\\1', Rscript[inDoc]) +# ## H1 -> H5: markdown to Asciidoc +# Rscript[inDoc] <- sub('^#####[ \t]*([^#]+)#*$', '===== \\1', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^####[ \t]*([^#]+)#*$', '==== \\1', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^###[ \t]*([^#]+)#*$', '=== \\1', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^##[ \t]*([^#]+)#*$', '== \\1', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^#[ \t]*([^#]+)#*$', '= \\1', Rscript[inDoc]) +# ## TODO: make sure we have same number of chars for ==== and ---- underlined titles + + ## Markdown version of *italic* and __bold__: done in asciidoc.conf + ## Markdown strikethrough ~~text~~ also done in asciidoc.conf + ## Super^script^and sub~script~ is identical between extended markdown + ## and asciidoc, but support also ... and ... +# Rscript[inDoc] <- gsub('', '~', Rscript[inDoc]) +# Rscript[inDoc] <- gsub('', '~', Rscript[inDoc]) + ## Note super^script without terminating ^ like in first .Rmd version NOT supported! + ## Terminate unterminated superscripts (markdown compatible) and subscripts + ## NO! It is too much error-prone!!! + #Rscript[inDoc] <- gsub('\\^([^^ \t\r\n]+)\\^?([ \t\r\n])', '^\\1^\\2', Rscript[inDoc]) + #Rscript[inDoc] <- gsub('\\~([^~ \t\r\n]+)~?([ \t\r\n])', '~\\1~\\2', Rscript[inDoc]) + + ## Convert markdown style force line break (2 or more space or 1 + ## or more tabs at the end of line) into asciidoc break (space +) + ## TODO: may be use this, but not in passthrough or listing or literal blocks! +# Rscript[inDoc] <- gsub("( |\t)[ \t]*$", " +", Rscript[inDoc]) + + ## Make sure rulers are on their own line + ## --- or - - - or *** or * * * or ___ + ## Note: if using ---, *** or ___: do not support more than three items! + ## This is to avoid clash with listing, sidebar and quoted blocks, respectively! +# Rscript[inDoc] <- sub('^[ /t]*[-*_]{3}[ /t]*$', "'''", Rscript[inDoc]) +# Rscript[inDoc] <- sub('^[ /t]*(- ){2,}-[ /t]*$', "'''", Rscript[inDoc]) +# Rscript[inDoc] <- sub('^[ /t]*(\\* ){2,}\\*[ /t]*$', "'''", Rscript[inDoc]) + ## Format page break...not needed, since not defined in markdown? + #Rscript[inDoc] <- sub('^[ /t]*<{3,}[ /t]*$', '\n<<<\n', Rscript[inDoc]) + + ## Convert markdown fenced block (possibly with syntax highlighting) ```s + ## into Asciidoc equivalent [source,lang]\n``` + ## TODO: allow for numbered lines (how?) + Rscript[inDoc] <- sub('^`{3,}([a-zA-Z0-9]+)[ \t]*$', '[source,\\1]\n```', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^`{3,}[ \t]*$', '----', Rscript[inDoc]) + + ## Convert markdown HTML blocks into Asciidoc HTML block by enclosing it inside + ## a passtrough block using ++++ + ## TODO: look if it is not already a passthrough and avoid this in listing bocks! +# Rscript[inDoc] <- sub('^(]+)>)', '\\1\n++++', Rscript[inDoc]) +# Rscript[inDoc] <- sub('^(<[^>]+)>)', '++++\n\\1', Rscript[inDoc]) + + ## Convert markdown image markups into Asciidoc equivalents + ## ![Alt text](path/to/img.jpg "opt title") on one line => image::/path/to/img.jpg[Alt text] + ## Same one inside text => image:/path/to/img.jpg[Alt text] + ## TODO: how to deal with optional title? And with white space? And non relative path? + ## TODO: I have a space too much if optional title is provided! + Rscript[inDoc] <- sub('^!(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)$', 'image::\\2\\1', Rscript[inDoc]) + Rscript[inDoc] <- sub('!(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)', 'image:\\2\\1', Rscript[inDoc]) + + ## Convert markdown links into Asciidoc equivalents + ## [A link](http://example.com "opt title") => http://example.com/[A link] + ## TODO: deal with spaces inside links + ## TODO: I have a space too much if optional title is provided! + Rscript[inDoc] <- sub('(\\[[^]]+\\])\\(([^)"\']+)[^)]*\\)', '\\2\\1', Rscript[inDoc]) + + + ## Asciidoc does not handle markdown quoted text well, currently + ## Just prepend {empty} for transforming it as text + ## TODO... and what about indented stuff? + + +# isTxt <- grepl("^(#' .*|[ /t]*)$", ttt) +# tt2 <- sub("^#' ", "", ttt) +# ## Transition text -> R chunk +# trans1 <- c(FALSE, !isTxt[-1] & isTxt[-length(isTxt)]) +# ## Add empty R chunk transition in trans1, if not there +# tt2t1 <- tt2[trans1] +# noTrans <- !grepl("^#[+-] ", tt2t1) +# tt2t1[noTrans] <- paste0("<<>>=\n", tt2t1[noTrans]) +# tt2[trans1] <- tt2t1 +# ## Transition R chunk -> text +# trans2 <- c(FALSE, isTxt[-1] & !isTxt[-length(isTxt)]) +# tt2[trans2] <- paste0("@\n", tt2[trans2]) + + + ## Convert \" into " inside doc blocks Rscript[inDoc] <- gsub('\\\\"', '"', Rscript[inDoc]) ## Convert \\ into \ inside doc blocks Rscript[inDoc] <- gsub("\\\\\\\\", "\\\\", Rscript[inDoc]) + ## Convert from R markdown `r 1+1`or ``r 1+1``into Sweave style for + ## inline R expressions \Sexpr{1+1} (note that we leave external ` if it is doubled!) + Rscript[inDoc] <- gsub('`r[ \t]+([^`]*)`', '\\\\Sexpr{\\1}', Rscript[inDoc]) + ## But WAIT: we need to escape } inside the expression!!! + ## First, replace Sexpr delimiters by %@%SEXPR%@% on both sides +# sexprs <- gsub("`r[ /t]([^`]*)`", "%@%SEXPR%@%\\1%@%SEXPR%@%", Rscript[inDoc]) +# ## Then, split the strings on this tag +# sexprs <- strsplit(sexprs, "%@%SEXPR%@%", fixed = TRUE) + ## Now, all even items in the list contain Sexpr... replace } by \} there, + ## if } is not already escaped + ## Note also that if the Sexpr was at the end of the string, we need to + ## append "" to it, in order to be able to put end delimiter at next step + ## Also, glue together the pieces by using \Sexpr{ and } as delimiters +# Rscript[inDoc] <- sapply(sexprs, function (x) { +# l <- length(x) +# if (!l) return("") +# evenPos <- !(1:l %% 2) +# x[evenPos] <- paste0("\\Sexpr{", gsub("[\\\\]?([{}])", "\\\\\\\\\\1", x[evenPos]), +# "}") +# paste(x, collapse = "") +# }) + + ## Convert from R markdown latex equations to AsciiDoc version + ## \[ ... \] => ++++\n
$ ... $
\n++++ for display equations + Rscript[inDoc] <- gsub('^[ \t]*\\\\\\[', '+++
$', Rscript[inDoc]) + Rscript[inDoc] <- gsub('^[ \t]*\\\\\\]', '$
+++', Rscript[inDoc]) + ## Note: for reasons I don't know, this does not work: $$latex ... $$ into ++++\n
$ ... $
\n++++ + ## $$latex ... $$ into +++
$ ... $
+++ + ## TODO: eliminate this! + #Rscript[inDoc] <- gsub('^[ \t]*\\$\\$latex', '+++
$', Rscript[inDoc]) +# Rscript[inDoc] <- gsub('^[ \t]*\\$\\$', '$
+++', Rscript[inDoc]) + ## \( ... \) => +++$ ... $+++ for inline equations + Rscript[inDoc] <- gsub('\\\\\\(', '+++$', Rscript[inDoc]) + Rscript[inDoc] <- gsub('\\\\\\)', '$+++', Rscript[inDoc]) + ## $latex ... $ into +++$ ... $+++ + ## TODO: eliminate this + #Rscript[inDoc] <- gsub('\\$latex ([^$]+)\\$', '+++$\\1$+++', Rscript[inDoc]) + + + ## Eliminate spaces and tabs between `` and and `` + ## => ``code`` (markdown allows but ignores spaces and tabs... this is + ## to allow backquotes inside code!). This is tricky, but here it is! + ## TODO: not good solution => solved in asciidoc.conf for single space inside `` code `` +# Rscript[inDoc] <- gsub("``[ \t]*([^ ]*( (?![ \t]*``)[^ ]*)*)[ \t]*``", "``\\1``", +# Rscript[inDoc], perl = TRUE) + ## Convert comments blocks using four or more #### by //// - Rscript[inDoc] <- gsub("^####+$", "////", Rscript[inDoc]) + ## No, since # is for title now +# Rscript[inDoc] <- gsub("^####+$", "////", Rscript[inDoc]) ## Convert line comments using ## by __ - Rscript[inDoc] <- gsub("^##", "__", Rscript[inDoc]) + ## NO! Now, it is //, since # is for titles +# Rscript[inDoc] <- gsub("^##", "__", Rscript[inDoc]) ## Replace all doc chunk starters (!") by @ Rscript[start] <- "@" @@ -139,7 +274,6 @@ html4 = "html", slidy = "html", slidy2 = "html", - wordpress = "html", docbook = "xml", docbook45 = "xml", latex = "tex", @@ -237,10 +371,18 @@ stop("Problems while creating the Asciidoc file (", TxtFile, ")") ## Do we use a particular theme with Asciidoc + ## I have got problem with `var` insode code blocks that are interpreted as + ## equations by MathML => do not use it!!! + #if (theme == "classic") { + # opts <- paste('" -b ', format, ' -a asciimath -a caption "', sep = "") + #} else { + # opts <- paste('" -b ', format, ' -a asciimath -a caption --theme=', + # theme, '@ "', sep = "") + #} if (theme == "classic") { - opts <- paste('" -b ', format, ' -a asciimath -a caption "', sep = "") + opts <- paste('" --unsafe -b ', format, ' -a latexmath -a caption "', sep = "") } else { - opts <- paste('" -b ', format, ' -a asciimath -a caption --theme=', + opts <- paste('" --unsafe -b ', format, ' -a latexmath -a caption --theme=', theme, '@ "', sep = "") } Modified: pkg/svDoc/R/svDoc-internal.R =================================================================== --- pkg/svDoc/R/svDoc-internal.R 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/R/svDoc-internal.R 2014-03-09 09:28:16 UTC (rev 553) @@ -5,8 +5,7 @@ if (!is.null(py)) options(python = py) ## Add an svDoc function to the R http daemon server to process svDoc pages - e <- get(".httpd.handlers.env", envir = asNamespace("tools"), - inherits = FALSE) + e <- getNamespace("tools")$.httpd.handlers.env e[["svDoc"]] <- function (path, query, body, ...) { ## Avoid partial argument match (cf warnings with ascii functions)! partmatch <- getOption("warnPartialMatchArgs") @@ -51,7 +50,7 @@ if (is.null(svDocFile)) svDocFile <- commandArgs(TRUE)[1] # If #! script if (!length(svDocFile) || !file.exists(svDocFile)) stop("svDocFile not found (", svDocFile, ")") - return(normalizePath(svDocFile, winslash = "/")) + normalizePath(svDocFile, winslash = "/") } @@ -148,5 +147,5 @@ if (!file.exists(py)) return(NULL) ## Recheck now... - if (.pyCheck(py)) return(py) else return(NULL) + if (.pyCheck(py)) py else NULL } Modified: pkg/svDoc/TODO =================================================================== --- pkg/svDoc/TODO 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/TODO 2014-03-09 09:28:16 UTC (rev 553) @@ -4,7 +4,7 @@ * Check styles for paragraphs -* Change syntax for onm code +* Change syntax for owm code * Use only one # at the beginning of a line for wiki comments??? @@ -16,7 +16,7 @@ * Support for equal signs at the end of titles too -* Support for block elements, including listing, litera, sidebar, quote, example +* Support for block elements, including listing, literal, sidebar, quote, example with styles * Full support for table formatting @@ -26,7 +26,7 @@ * Support for special inline stiles like variable, code, package, command, menu item, file, program -* Support for replacepent for R, SciViews, LyX, LaTeX, ... +* Support for replacement for R, SciViews, LyX, LaTeX, ... * Support for level 1 & 2 undelined titles (=== and ---, respectively) Modified: pkg/svDoc/inst/asciidoc/CHANGELOG.txt =================================================================== --- pkg/svDoc/inst/asciidoc/CHANGELOG.txt 2014-03-02 12:31:56 UTC (rev 552) +++ pkg/svDoc/inst/asciidoc/CHANGELOG.txt 2014-03-09 09:28:16 UTC (rev 553) @@ -1,9 +1,85 @@ AsciiDoc ChangeLog ================== -:website: http://www.methods.co.nz/asciidoc/ +:website: http://asciidoc.org/ +Version 8.6.9 (2013-11-09) +-------------------------- +.Additions and changes +- 'html5', 'xhtml11' and 'slidy' outputs now wrap 'pre' element + contents at right margin (see +https://groups.google.com/group/asciidoc/browse_thread/thread/9877a316b7a47309). +- Vim syntax file: highlight line breaks in lists (patch submitted by + Alex Efros). See + https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a). +- Vim syntax file: fixed highlighting of lines with spaces preceding + an indented paragraph. See + https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a +- Vim syntax file: dropped ')' from list of illegal characters + following opening quote. See + https://groups.google.com/group/asciidoc/browse_thread/thread/1a60eb4507a0555f/264c39c6a89fc7a0 +- Added {plus} intrinsic attribute. See + http://code.google.com/p/asciidoc/issues/detail?id=14 +- Allow `tabsize=0 in` configuration file. See + https://groups.google.com/group/asciidoc/browse_thread/thread/c88457020288ce1d +- Removed 'wordpress' backend into the blogpost project (where it + belongs) as an AsciiDoc backend plugin. +- Added HTML5 footer badges. +- Added favicon to AsciiDoc website. +- Changed AsciiDoc website domain to 'asciidoc.org'. +- Vim syntax file: closing quote character cannot be immediately + followed by same closing quote character. +- Documentation updates. +- If admonition icons are embedded using the Data URI Scheme and the + icons directory is undefined or does not exist then the 'iconsdir' + attribute is set to the location of the icons installed in the + AsciiDoc configuration directory. +- Updated `./stylesheets/pygments.css` from pygments 1.4. +- HTML backends: Align inline images to text-bottom. +- html4 backend: Added 'hr' attribute to make the inter-section + horizontal ruler element optional. +- Documented 'Callout lists cannot be used within tables'. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/268f9b46ebc192d3 +- Removed Vim related stuff from the installer makefile. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 + and + https://groups.google.com/group/asciidoc/browse_thread/thread/cd07629fa7a53fb3 +- Dropped `vim/ftdetect/asciidoc_filetype.vim` from distribution, the + file detection was broken and the default settings satisfied noone. +- Vim syntax highlighter: increase sync backtracking to catch changes + to large block elements. +- Added Romanian language configuration file. Contributed by Vitalie + Lazu. See + https://groups.google.com/group/asciidoc/browse_thread/thread/2fe14a10dbf20d20/27726e7e13f7bfc7?lnk=gst&q=romanian#27726e7e13f7bfc7 +- Added ruler and line-break outputs to HTML Help outputs. Patch + submitted by DonM. See + https://groups.google.com/group/asciidoc/browse_thread/thread/b131d0155eccd73e +- Added Czech language configuration file. Contributed by Petr Kl?ma. +- html4 backend: allow embedded images and icons (data-uri + attribute). +- html4 backend: table and example block caption place at bottom for + consistency. +- html4 backend: dropped border around example block. +- html4 backend: cellpaddings made equal to 4 for consistency. +- Vim syntax highligher: Highlight closing OpenBlock delimiter when it + immediately follows a list. +- Updated html5 backend (previous commit was xhtml11 only). See: + https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 +- Embedded data-uri images now figure file mimetype from file contents + rather than the file extension. Patch submitted by Lex Trotman. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 + +.Bug fixes +- `indexterm2:[]` macro syntax now recognized. See + https://groups.google.com/group/asciidoc/browse_thread/thread/1b3f1a0f0a21425e +- Synthesised `*-option` attributes for options set in table conf file + style entries. See + https://groups.google.com/group/asciidoc/browse_thread/thread/8aa340a3069ef5f1/a727a8a564eea76c +- Makefile: Fixed sh compatibility issue. See + https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 + + Version 8.6.8 (2012-07-17) -------------------------- .Release highlights @@ -1561,7 +1637,7 @@ reflect these changes. - Highlighted source code paragraphs have been implemented -- it's a much more convenient way to enter short code examples (see - http://www.methods.co.nz/asciidoc/source-highlight-filter.html[the + http://asciidoc.org/source-highlight-filter.html[the online docs]). - The source highlighter and music filter syntax has changed -- they now used the ListingBlock syntax customized with 'source' and @@ -1688,7 +1764,7 @@ .Additions and changes - Added VMiklos's 'permalink' patch for auto-generated section IDs (enabled by default by the `sectids` attribute). -- Added http://www.methods.co.nz/asciidoc/faq.html[FAQ] to website. +- Added http://asciidoc.org/faq.html[FAQ] to website. - Changed format of \{localdate} attribute to ISO 8601 (`%Y-%m-%d`). - Added `abc2ly --beams=None` option to make `music2png.py` conform to ABC's notion of beams. @@ -1723,7 +1799,7 @@ - http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] capability has been added for users who are more familiar with or prefer LaTeX math formulas to the - http://www.methods.co.nz/asciidoc/asciimathml.html[ASCIIMathML] + http://asciidoc.org/asciimathml.html[ASCIIMathML] notation (thanks to Arthur Sakellariou for the patch). - The 'source highlight' and 'code' filters now process embedded callouts. @@ -1814,7 +1890,7 @@ `manpage` if `--format=manpage` else defaults to `article` (previously `--doctype` always defaulted to `article`). - Added an 'External Resources' section to the - http://www.methods.co.nz/asciidoc/index.html[AsciiDoc home page]. + http://asciidoc.org/index.html[AsciiDoc home page]. .Bug fixes @@ -1830,7 +1906,7 @@ http://tpl.sourceforge.net/userguide.html[tpl User Guide] for a fancier layout. Use the `-a toc -a numbered` command-line options to produce a number table of contents. [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/sciviews -r 553