emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
614 stars 160 forks source link

[Fix #1185] Move ask-for directory code after ess-r-mode startup #1186

Closed vspinu closed 2 years ago

vspinu commented 2 years ago

We have a problem with #1185

The asking for the directory happens before the inferior-ess-r-mode is installed into the buffer, which means the mode hooks that set project-find-directory have not run yet. Let binding around the call to inferior-ess as it currently is not good because of the warning in #1185.

The proposed solution is not ideal either because the functions which are run in the mode-hook don't see the new default-directory. I am not sure if this is acceptable.

All other ways to fix this I can think of are rather hacky :thinking: