[ESS] [ESS-bugs] ess-mode 5.9.1;	autocompletion of file path always uses initial working directory
    Stephen Eglen 
    S.J.Eglen at damtp.cam.ac.uk
       
    Fri Jun  4 11:34:59 CEST 2010
    
    
  
>    Solution: Use `M-x ess-change-directory'.  This will prompt you for
> the directory to change to.  It will then change directory within the
> *S* buffer, and also update the emacs variable `default-directory'.
> Alternatively, if you have already executed setwd(), press `M-RET'
> within the *S* buffer so that Emacs can update `default-directory'.
> 
And just in case anyone is wondering 'why M-RET'?..
It is because XEmacs has had a similar facility in *shell* buffers bound
to that same key: shell-resync-dirs.
Emacs currently has a function called 'M-x dirs' which does the same
thing.  So you for Emacs users you can do:
(add-hook 'shell-mode-hook 'my-shell-hook)
(defun my-shell-hook ()
  " my hook to change local shell-mode-map."
  (define-key shell-mode-map (kbd "M-RET") 'dirs))
I'll get in touch with Emacs developers to see if this could be added to
Emacs, but in the meantime, the above should work.
stephen
    
    
More information about the ESS-help
mailing list