XEmacs/ESS problem with ole automation in SPlus and RDCOMClient in R

john.gavin at ubs.com john.gavin at ubs.com
Thu Mar 18 11:15:58 CET 2004


Hi Richard,

I have had some success.

You wrote:
> unless XEmacs includes gnuserv or emacsserv,
> you probably need to get the gnuserv package

I have gnuserv.el (and gnuserv.elc) in XEmacs
(in 'C:\Program Files\XEmacs\XEmacs-21.4.6\lisp').
And I have gnuserv.exe, gnudoit.exe, gnuclient.exe 
and gnuclientw.exe in my path.

You wrote:
> ddeclient.exe is included with gnu emacs.  
> I think it will work with xemacs.

I dont have this on my C: drive.
So I downloaded it and put it in my path.
(with help from an old email of yours
https://stat.ethz.ch/pipermail/ess-help/2002-February/000870.html)

So now I can start S-Plus GUI, then from within XEmacs
M-x S+6-existing and get the following lines 
in SPlus GUI command window:

> #S+6
> options(STERM='ddeESS', editor='gnuclient.exe', 
  pager='gnuclientw.exe', help.pager='gnuclientw.exe')

So I can now use XEmacs to create the objects I need.

> exists("create.ole.object")
[1] T
> create.ole.object("Fusion.Metadata")
An object of class "OLEClient"

Slot ".Data":
[1] 144750920

Slot "gui.id":
[1] 4115

Slot "gui.name":
[1] "Fusion.Metadata"

Slot "timestamp":
[1] 1079602294

This solves my original problem with SPlus.
As you suggested, I will email the RCOM mailing list 
to try to find out what might be causing R to hang
when I try

> library(RDCOMClient)
> COMCreate("Fusion.Metadata")

(once I have experimented some more with this SPlus solution).

You wrote:
> If you open Sqpe from the S-Plus Console icon, 
> you will need to run the library() command 
> to find create.ole.object. 

Yes, that is correct. Here is the output, pasted from the console,

Professional Edition Version 6.2.1  for Microsoft Windows : 2003
Working data will be in C:/ETC/INSIGHTFUL/SPLUS62/USERS/GAVINJ
> create.ole.object
Problem: Object "create.ole.object" not found
> library(sgui)
> create.ole.object
function(name)
{
        if(!exists("**OLE.session.marker**", where = 0))
...
        return(ole.obj)
}
> create.ole.object("Fusion.Metadata")

A few seconds after entering the last command, the window closes
without printing any error message.
(This is the same as what happens from within XEmacs.)

You wrote:
> I am puzzled as to why you don't get STERM set.  

As I mentioned above, when running SPlus GUI and M-x S+6-existing 
within XEmacs, the first line I see in the GUI command window is 

options(STERM='ddeESS', editor='gnuclient.exe', 
  pager='gnuclientw.exe', help.pager='gnuclientw.exe')

So STERM is set there. When I try M-x Sqpe within XEmacs, I see

options(interactive=T)
S-PLUS : Copyright (c) 1988, 2003 Insightful Corp.
S : Copyright Lucent Technologies, Inc.
Professional Edition Version 6.2.1  for Microsoft Windows : 2003 
Working data will be in s:/qrms/stats/r 
> > 

There is no mention of STERM.
As I mentioned yesterday, in R I see
 options(STERM='iESS', editor='winclient.exe')
so XEmacs is setting STERM in that case.

You wrote:
> We do that in essdsp6w.el
> the same file that defines the command M-x Sqpe

In case it matters, the header from that file (essdsp6w.el) reads

;;; essdsp6w.el --- S-PLUS 6.x  for Windows customization
;;; copied and edited from essd-sp4.el
;;; Richard M. Heiberger, April 2001

;; Copyright (C) 2001 Richard M. Heiberger <rmh at sbm.temple.edu>

;; Author: Richard M. Heiberger <rmh at sbm.temple.edu>
;; Maintainer: Richard M. Heiberger <rmh at sbm.temple.edu>
;; Created: April 2001
;; Modified: $Date: 2003/12/09 00:07:42 $
;; Version: $Revision: 5.20 $
;; RCS: $Id: essdsp6w.el,v 5.20 2003/12/09 00:07:42 rmh Exp $

and I can see STERM mentioned twice:

line 104    (ess-STERM  . "ddeESS")
line 140    (ess-STERM  . "iESS")

I dont see any mention of STERM in my init.el file
(but it is possible that something in my rather long init.el
file is upsetting STERM).

Please let me know if there is any other information 
that I can supply that might help explain why STERM
is not set by XEmacs when calling SPlus via M-x Sqpe.
That said, I havent noticed any problems linked to this before
so I assume that I live without it in most cases.

Thanks for your time with this.

Regards,

John.

John Gavin <john.gavin at ubs.com>,
Quantitative Risk Models and Statistics,
UBS Investment Bank, 6th floor, 
100 Liverpool St., London EC2M 2RH, UK.
Phone +44 (0) 207 567 4289
Fax   +44 (0) 207 568 5352

Date: Wed, 17 Mar 2004 12:26:10 -0500
From: "Richard M. Heiberger" <rmh at temple.edu>
Subject: RE: XEmacs/ESS problem with ole automation in SPlus and
	RDCOMClient	in R
To: john.gavin at ubs.com, ess-help at stat.math.ethz.ch
Message-ID: <d4e87.2295ea38.81f6e00 at po-a.temple.edu>
Content-Type: text/plain; charset=us-ascii

unless XEmacs includes gnuserv or emacsserv,
you probably need to get the gnuserv package

Utilities that work with NTemacs on Windows machines.<BR>
<A HREF="ftp://ftp.gnu.org/gnu/windows/emacs/contrib/gnuserv.zip">gnuserv</A><BR>
<A HREF="ftp://ftp.gnu.org/gnu/windows/emacs/contrib/gnuserv.readme.nt">gnuserv.readme</A><BR>

ddeclient.exe is included with gnu emacs.  I think it will work with xemacs.

If you open Sqpe from the S-Plus Console icon, you will need to run the
library() command to find create.ole.object.  What I am hoping is that it
will give you a useful error message when you attempt to use it.  Most likely
you will get the same freeze that you see when you run Sqpe inside emacs.

I am puzzled as to why you don't get STERM set.  We do that in
essdsp6w.el
the same file that defines the command M-x Sqpe

Visit our website at http://www.ubs.com

This message contains confidential information and is intend...{{dropped}}




More information about the ESS-help mailing list