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 #1179] Add support for R projects #1181

Closed vspinu closed 2 years ago

vspinu commented 2 years ago

Project XYZ is defined by XYZ/.Rpfofile, XYZ/DESCRIPTION or XYZ/XYZ.Rproj unless it's the user's home directory.

vspinu commented 2 years ago

Should we also look into turning on ess--enable-experimental-projects by default to set the correct startup directory? I've been using this for a few years now.

That's the idea indeed. I will add that with the doc and newfeat changes once we agree on the details of the project lookup.

ESS always starts in ~ if there is no inner projects

This is taken care by explicitely blacklisting user's home here. I think it's fine for now. Later we maybe could add an explicit blacklist of directories.

vspinu commented 2 years ago

IIRC the concern was that if people have their home directory versioned,

This is a strange use case but we could indeed either just call our function directly or maybe better blacklist ~ after project-current call.

vspinu commented 2 years ago

@lionel- I think I am done with activating it by default.

I removed the super ugly special case for starting R in test directory. Whenever starting in test dir is required the user can navigate to test dire manually on process startup or with setwd or with C-c C-e /. Not a big deal I think.

lionel- commented 2 years ago

I removed the super ugly special case for starting R in test directory. Whenever starting in test dir is required the user can navigate to test dire manually on process startup or with setwd or with C-c C-e /. Not a big deal I think.

I agree, this is what I'm doing as well. I have keybindings for setting wd to the project dir or to the current dir, which I use relatively frequently.

mmaechler commented 2 years ago

I think it is since this change that I get a warning message (here cited from *Messages*), i.e., the text and a bit of a timeout:

Making project-find-functions buffer-local while locally let-bound!