emacs-ess / ESS

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

"ESSR" not in `search()` - when R process was started by an `(eval-*)` - alike from a `*.R` buffer #1201

Open mmaechler opened 2 years ago

mmaechler commented 2 years ago

I'm sorry I cannot give a repr.ex. for this.
I have observed this regularly but still rarely (I use ESS+R every working day for many hours). As suggested in the title, here are symptoms / typical cases:

  1. I open some R related files, almost always *.R source files when I have no running R process (inferior, i.e. inside my emacs).
  2. I want to send a line or two from my R script to the R process (i.e., I want to evaluate that R code), calling one of the several ess-eval-* functions via a key stroke
  3. Emacs/ESS notices that I don't have a running R process and asks me about the starting directory. I typically press [Enter] as ESS guesses the directory fine, and an *R* buffer is created and R "started inside it".
  4. Some things work as usual, but quite a few others don't.. and I enter search() in the iESS buffer or use the C-c C-s i.e., (ess-display-search) which shows my short search path and does (in that case) NOT contain "ESSR"
  5. I kill the R process and restart via M-x R or similar, and then all is fine.

As said initially, most of the time this does not happen. However when it happens ESS behaves slowly and "hangs" until my fingers automatically use C-g (without my main brain even being aware of it ;-) ) and use it again and again .. until after some frustration I give up and then typically do notice ("4." above) that attaching "ESSR" had not happened when R was started and so --- no wonder at all --- ESS can not work appropriately, as all the .ess*() utility functions are provided via "ESSR"