[Sciviews-commits] r523 - in pkg/svKomodo: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jan 27 23:38:52 CET 2013


Author: phgrosjean
Date: 2013-01-27 23:38:51 +0100 (Sun, 27 Jan 2013)
New Revision: 523

Modified:
   pkg/svKomodo/DESCRIPTION
   pkg/svKomodo/NEWS
   pkg/svKomodo/R/svKomodo-internal.R
   pkg/svKomodo/inst/NEWS.Rd
Log:
svKomodo: use ;onAttach() instead of .onLoad()
Checking if locate is available before use, and don't try to use it on Mac OS X
Use of SciViews:TempEnv instead of TempEnv (from svMisc >= 0.9-68)

Modified: pkg/svKomodo/DESCRIPTION
===================================================================
--- pkg/svKomodo/DESCRIPTION	2013-01-27 22:01:37 UTC (rev 522)
+++ pkg/svKomodo/DESCRIPTION	2013-01-27 22:38:51 UTC (rev 523)
@@ -1,13 +1,13 @@
 Package: svKomodo
 Type: Package
-Version: 0.9-58
-Date: 2012-06-22
+Version: 0.9-59
+Date: 2013-01-27
 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 <phgrosjean at sciviews.org>
-Depends: R (>= 2.6.0), svMisc (>= 0.9-62)
+Depends: R (>= 2.6.0), svMisc (>= 0.9-68)
 Imports: utils
 Suggests: svHttp, svSocket
 SystemRequirements: Komodo Edit (http://www.openkomodo.com), SciViews-K (http://www.sciviews.org/SciViews-K)

Modified: pkg/svKomodo/NEWS
===================================================================
--- pkg/svKomodo/NEWS	2013-01-27 22:01:37 UTC (rev 522)
+++ pkg/svKomodo/NEWS	2013-01-27 22:38:51 UTC (rev 523)
@@ -1,5 +1,17 @@
 = svKomodo News
 
+== Change in svKomodo 0.9-59
+
+* R is now configured to be used with SciViews Komodo (Komodo Edit + SciViews-K)
+  when the package is attached. It was previously configured when it was loaded.
+  
+* Temporary objects are now stored in SciViews:TempEnv instead of TempEnv and
+  consequently, svMisc >= 0.9-68 is needed.
+  
+* Further protection before looking for komodo with locate: (1) if locate is not
+  there, do not try to use it, and (2) do not use it on Mac OS X.
+
+
 == Changes in svKomodo 0.9-58
 
 * The package was not loading correctly when not on .libPaths. Fixed.

Modified: pkg/svKomodo/R/svKomodo-internal.R
===================================================================
--- pkg/svKomodo/R/svKomodo-internal.R	2013-01-27 22:01:37 UTC (rev 522)
+++ pkg/svKomodo/R/svKomodo-internal.R	2013-01-27 22:38:51 UTC (rev 523)
@@ -109,7 +109,7 @@
 		options(OutSep = ",")
 }
 
-.onLoad <- function (lib, pkg)
+.onAttach <- function (lib, pkg)
 {
 	## Make sure config is OK
 	.loadSvOptions()
@@ -158,11 +158,17 @@
 		}
 		
 		if (length(Komodo) == 0 || Komodo == "") {
-			Komodo <- try(suppressWarnings(system(
-				"locate --basename -e --regex ^komodo$ | grep -vF 'INSTALLDIR' | grep -F 'bin/komodo' | tail --lines=1",
-				intern = TRUE, ignore.stderr = TRUE)), silent = TRUE)
-			if (inherits(Komodo, "try-error")) Komodo <- NULL
-			#debugMsg("locate komodo", "returned", Komodo)
+			isLocate <- suppressWarnings(length(system('which locate',
+					intern = TRUE)) > 0)
+			if (!isLocate || isMac()) { # locate is not there or Mac OS X
+				Komodo <- NULL
+			} else {
+				Komodo <- try(suppressWarnings(system(
+					"locate --basename -e --regex ^komodo$ | grep -vF 'INSTALLDIR' | grep -F 'bin/komodo' | tail --lines=1",
+					intern = TRUE, ignore.stderr = TRUE)), silent = TRUE)
+				if (inherits(Komodo, "try-error")) Komodo <- NULL
+				#debugMsg("locate komodo", "returned", Komodo)
+			}
 		}
 		## Just to avoid warnings while compiling outside of Windows...
 		readRegistry <- function() return()

Modified: pkg/svKomodo/inst/NEWS.Rd
===================================================================
--- pkg/svKomodo/inst/NEWS.Rd	2013-01-27 22:01:37 UTC (rev 522)
+++ pkg/svKomodo/inst/NEWS.Rd	2013-01-27 22:38:51 UTC (rev 523)
@@ -1,6 +1,19 @@
 \name{NEWS}
 \title{NEWS file for the svKomodo package}
 
+\section{Changes in version 0.9-59}{
+	\itemize{
+    \item{ R is now configured to be used with SciViews Komodo (Komodo Edit +
+	    SciViews-K) when the package is attached. It was previously configured
+		when it was loaded. }
+    \item{ Temporary objects are now stored in SciViews:TempEnv instead of
+	    TempEnv and consequently, svMisc >= 0.9-68 is needed. }
+    \item{ Further protection before looking for komodo with locate: (1) if
+	    locate is not there, do not try to use it, and (2) do not use it on
+		Mac OS X. }
+  }
+}
+
 \section{Changes in version 0.9-58}{
 	\itemize{
     \item{ The package was not loading correctly when not on \code{.libPaths}. Fixed. }



More information about the Sciviews-commits mailing list