ESS source directory and filenames

A.J. Rossini rossini at
Tue Jan 4 00:08:12 CET 2000

>>>>> "BP" == Brett Presnell <presnell at> writes:

    BP> I think I've been here before when I tried once upon a time to
    BP> use ESS, but still the answer escapes me.

    BP> I'm trying to use ESS-5.1.11 with GNU Emacs 20.4.1 running
    BP> under Solaris 2.6 (SunOS 5.6) on an Ultra 10. 

    BP> What I would like is to have dump files saved in
    BP> directories/files of the form

Yep... it worked way back with Emacs 19.34, except that you'll always
have the problem with R, which doesn't handle things in the same way.
(ess-search-list) should only be for S-* types, in this case, not for

    BP> (setq ess-source-directory
    BP> 	  (lambda () (file-name-as-directory
    BP> 		      (expand-file-name
    BP> 		       (concat (car ess-search-list)
    BP> 			       "/" ess-suffix "-src")))))

I think I'd want to do something like replace
	(concat (car ess-search-list)
	(concat (if (string= ess-dialect "R")
	         (car ess-search-list))
or similar.  (note - the above is untested code, it gives the flavor,
but I've not compiled nor run it).

    BP> Of course I've tried many variations, particularly of the
    BP> setting of ess-dump-filename-template, since I know that
    BP> something better than this will be required to get what I
    BP> want.  In particular I've tried working with ess-suffix and
    BP> adding the setting of ess-dump-filename-template to
    BP> inferior-ess-mode-hook.  Also, with regard to the setting of
    BP> ess-source-directory, I find that ess-directory is nil in my S
    BP> and R process buffers, which is why I'm using ess-search-list
    BP> above.

As you are supposed to; see ess-vars.el (and ess-source-directory) for 
more details.

    BP> 1.  In S, using C-cC-d results in the listings of the searches
    BP>     being echoed in the S (or R) process buffer.  This is very
    BP>     annoying.  Can it be turned off?

I don't see that with R.  With Splus 5.x, it's a known bug.

    BP> 2.  When running S, file-name-as-directory seems to get work
    BP>     correctly, but my setting of ess-dump-filename-template is
    BP>     ignored or overridden by the default.  Thus if I start S
    BP>     in my home directory and try to create myfcn with C-cC-d,
    BP>     the files gets dumped to "~/S-src/presnell.myfcn.S".

Yep.  We need to fix that -- the problem is that the "wrong" place
(really, the right place right now) is in the dialect specification

    BP>     let me use "customize" to modify the variable, though I

Customize support hasn't been installed.  The catch is that we need to 
still support 19.28--34, making a straightforward upgrade infeasible.

    BP> 3.  When running R, even file-name-as-directory doesn't work
    BP>     properly because ess-search-list's value is

    BP>     (".GlobalEnv" "Autoloads" "package:base")

Right, see the fix I provided for this...

    BP> Any help will be much appreciated.  In fact, if anyone is
    BP> doing something similar, just sending along the relevant lines
    BP> from your .emacs would be great.

Please send to the list!  It'd be great to update the directories...


A.J. Rossini		       Research Assistant Professor of Biostatistics 
Center for AIDS Research/HMC/UW		Box 359931   206-731-3647 (3693=fax)
Biostatistics/Univ. of Washington	Box 357232   206-543-1044 (3286=fax)
VTN/SCHARP/FHCRC				     206-667-7025 (xxxx=fax)
rossini at
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at

More information about the ESS-help mailing list