[ESS-bugs] ess-mode 5.2.8; opening file with tramp mode -> error

David Reitter david.reitter at gmail.com
Tue Feb 28 23:01:05 CET 2006


Hi Stephen,

>
> Debugger entered--Lisp error: (file-error "Opening directory" "no
> such file or directory" "/ssh:dreitter at ssh.inf.ed.ac.uk:/home/
> dreitter/PhD/stats/")
>    file-name-all-completions("R-1" "")
>    ess-find-exec-completions("R-1")
>    mapcar(ess-find-exec-completions ("R-1" "R-2"))
>    ess-r-versions-create()
>    byte-code("1!RAFGM1$fAHIM1$fAJKM1$fALMM1$frz8	
>
> I'm a bit bemused why it is calling ess-r-versions-create
>
> As far as I can see, that function is just called once, in
> ess-site.el, and so should be run only once, when (require 'ess-site)
> is executed.
>
> So, what is your set  up in .emacs?  Are you autoloading R mode or
> something? Do you get this error in ssh when opening all files with
> tramp?  what happens in you first start M-x R and then try opening a
> file with tramp?

Indeed, with an M-x R-mode beforehand, the error goes away.
In Aquamacs, R is loaded via site-lisp as below. Instead of running  
"load" from site-lisp, I autoload it. Can't see anything wrong with  
that (I'm sure you'll tell me).

I don't really understand `ess-find-exec-completions', with its i, j  
and k, but my take is that  ess-tmp-dir is "" when it should probably  
be something, and that leads to the current working directory being  
assumed, which will probably fail with the reasonable error we're  
seeing when using tramp mode.  I guess the lesson is that you can't  
count on the working directory being accessible at all times.
Why would `ess-find-exec-completions' want to try a completion with  
the working directory anyways? Shouldn't it just look in everything  
in `exec-path' ?


-- David



;; ESS
(autoload 'ess-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'R-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'S-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'Rnw-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'omegahat-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'XLS-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'STA-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'SAS-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'S-transcript-mode "ess-site" "Emacs Speaks Statistics" t)
(autoload 'R-transcript-mode "ess-site" "Emacs Speaks Statistics" t)

(setq auto-mode-alist
	(append
	 '(("\\.sp\\'"		. S-mode) ;; re: Don MacQueen <macq at llnl.gov>
	   ("\\.[qsS]\\'"	. S-mode) ;; q,s,S [see ess-restore-asm-extns above!]
	   ("\\.ssc\\'"		. S-mode) ;; Splus 4.x script files.
	   ("\\.[rR]\\'"	. R-mode)
	   ("\\.[rR]nw\\'"	. Rnw-mode)
	   ("\\.[rR]profile\\'" . R-mode)
	   ("NAMESPACE\\'"	. R-mode)
	   ("\\.omg\\'"         . omegahat-mode)
	   ("\\.hat\\'"         . omegahat-mode) ;; Duncan's pref'd...
	   ("\\.lsp\\'"		. XLS-mode)
	   ("\\.do\\'"		. STA-mode)
	   ("\\.ado\\'"		. STA-mode)
	   ("\\.[Ss][Aa][Ss]\\'"	. SAS-mode)
	   ;; Many .log/.lst files, not just SAS
	   ;;("\\.log\\'"	. SAS-log-mode)
	   ;;("\\.lst\\'"	. SAS-listing-mode)
	   ("\\.[Ss]t\\'"	. S-transcript-mode)
	   ("\\.[Ss]out"	. S-transcript-mode)
	   ("\\.[Rr]t\\'"	. R-transcript-mode)
	   ("\\.[Rr]out"	. R-transcript-mode)
           )
	 auto-mode-alist))


(defvar ess-etc-directory (concat  (mac-resources-path)
				  "/site-lisp/edit-modes/ess-mode/etc"
				  ))




More information about the ESS-bugs mailing list