object name completion in ESS 5.1.13 -- AND S+5

Martin Maechler maechler at stat.math.ethz.ch
Thu Apr 6 15:29:18 CEST 2000

>>>>> "Naoki" == Naoki Saito <saito at math.ucdavis.edu> writes:

    Naoki> Hi, I recently installed in ESS 5.1.13.  I am using Splus 5.1.
    Naoki> Somehow, the object name completion key (i.e., tab key) is not
    Naoki> working now.  It simply says: No completions of 'partial object
    Naoki> name'

    Naoki> With 5.1.12, it was working properly.
{when I first read this, I couldn't believe you,  but now I do, see below}

I knew that object name completion with S-plus 5.1
only worked in certain cases -- in all versions of ESS,  but see below.

You can get pretty good working [in my quite limited experience] object
name completion when you install the 
"object name database" 
as the ess-5.1.x/README file tells you (down at line 300-something):

>>    *   (OPTIONAL) If you are running S-PLUS or R, you might consider
>>      installing the database files.  From within (X)Emacs, `C-x d' to
>>      the   directory containing ESS.  Now:
>>                  M-x S+3
>>        (or M-x S+5: get running.  once you have reached the SPLUS
>>      prompt, do:)
>>                  M-x ess-create-object-name-db
>>        (this will create the file: ess-s+3-namedb.el; if it isn't in the
for S-plus 5.x (and for me), this is  ess-sp5-namedb.el

>>        ESS directory, move it there).
>>      Then, completions will be autoloaded and will not be regenerated
>>      for   every session.

    Naoki>   I would like to know how to correct this behavior.
(me too ... ;-)

One problem we are currently seeing is from the (incompatible) change of the  
function in S-plus 5.1

In S-plus 3.x (and 4.x ?)
would return a vector of character strings, where each string was
indicating if the corresponding attached "database" was a *directory*
"automagically" by containing "/" -- and ESS looks at these and did
differentiate the directories from the non-directory attached databases.

Now in S+5.x,
things have changed quite a bit, we have

>>   Version 5.1 Release 1 for Linux 2.0.31 : 1999 
>>   Working data will be in .Data 
>>   > attach(as.data.frame(iris))
>>   > search()
>>   [1] ".Data"               "as.data.frame(iris)" "splus"              
>>   [4] "stat"                "data"                "trellis"            
>>   [7] "main"               
>>   > search("paths")
>>   [1] "/u/maechler/S/splus5"                    
>>   [2] ""                                        
>>   [3] "/usr/local/app/splus/5.1/library/splus"  
>>   [4] "/usr/local/app/splus/5.1/library/stat"   
>>   [5] "/usr/local/app/splus/5.1/library/data"   
>>   [6] "/usr/local/app/splus/5.1/library/trellis"
>>   [7] "/usr/local/app/splus/5.1/library/main"   

where search("paths") does give directories, but different ones than
search() in S+3.x, namely no final ".Data" and hence ESS still cannot look
at these directories to see if they have changed (and if yes, ESS would
newly synchronize the name database used for completion).

Actually, now that I am looking at it more closely,
yes in   5.1.12 (and earlier) we still only used  
which -- you can see from the above -- correctly gives the .Data directory
but gives no other directories.

On the other hand,  5.1.13  uses  search("paths")  and hence doesn't give
the correct directories either (should give the ".Data" ...)

--> I start seeing some light :  
We need an even different  function / functionality to deal with S+5
name completion :

Something like

  searchESS <- function() {
	    s <- search("paths")
	    s <- s[s != ""]

and we would do this in Emacs lisp instead of S-plus.

Let's just hope that  S-plus 5.2 will still behave the same...

hmmm, this means that we have another round of fixing ESS before releasing
5.1.14,   okay...

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch

More information about the ESS-help mailing list