emacs-ess / ESS

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

`emacs -f R` starts in .git repo folder #1269

Open barryrowlingson opened 10 months ago

barryrowlingson commented 10 months ago

I launch emacs with ESS via emacs -f R from the command line, and I'm sure it always used to offer the current shell folder as the "R starting project directory" - but now (probably since I reinstalled from github) it seems to look at if the current shell folder is under a git repository and offer that as the starting project directory.

For example with this structure:

fnord
├── bar
├── baz
│   └── .git
└── .git

starting from fnord offers that as the starting R directory, as does starting in fnord/bar (because that folder is under the fnord/.git repo, but starting in fnord/baz tries to start there since its a different repo.

Basically I'd like emacs -f R to start where I started it from.

I can't see this documented (although maybe I'm looking at the docs for the wrong branch or something) and if it can be switched off that would be great.

lionel- commented 10 months ago

We now start in project-current. But see inferior-ess--get-startup-directory, there's some legacy options like ess-startup-directory-function that might be useful for you to recover the original behaviour.