emacs-ess / ESS

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

Inside `*R-devel*`: cannot call R-devel when there's one already `((wrong-type-argument stringp nil))` #986

Open mmaechler opened 4 years ago

mmaechler commented 4 years ago

I'm almost sure this is very new ... at least I have never seen it till now (so I assume it's a very recent change in the ESS lisp sources): I want to start a second instance of R-devel in my emacs, and do

M-x R-devel 

The error as in the *Messages* buffer: inferior-ess--get-proc-buffer-create: Can’t start a new session in buffer ‘R-devel‘ because one already exists

jabranham commented 4 years ago

I can't reproduce this, FWIW. Can you post the backtrace?

mmaechler commented 4 years ago

.. not yet. As mentioned I have never seen it, and now in a new emacs, cannot get it again ...

mmaechler commented 4 years ago

Related -- also a bug in the management of several R processes (I had 4 of them:

Currently, after C-c C-q which calls (ess-quit) in the R-devel-64-clean buffer, I cannot call M-x R-devel-64-clean anymore in that still existing *R-devel-64-clean* buffer (where base::q("no") has been called) or when in another buffer to create a new R buffer running (R-devel which is my personal R development version, or R-devel-64-clean which is the current R development version (from svn), "as is", i.e., not modified by me). I get the error (from theMessages` buffer, so I see the function name):

   file-remote-p: Wrong type argument: stringp, nil

How can I "get a backtrace". ? Quickly tried to search (duckduckgo..) but the pages I was lead to assumed more about how debugging in Emacs works than I know.

lionel- commented 4 years ago

@mmaechler You can get backtraces with M-x toggle-debug-on-error.

mmaechler commented 4 years ago

Thank you, Lionel! Here's the backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  find-file-name-handler(nil file-remote-p)
  file-remote-p(nil)
  run-ess-r(nil)
  R-devel-64-clean(nil)
  funcall-interactively(R-devel-64-clean nil)
  apply(funcall-interactively R-devel-64-clean nil)
  repeat-complex-command(1)
  funcall-interactively(repeat-complex-command 1)
  call-interactively(repeat-complex-command nil nil)
  command-execute(repeat-complex-command)
vspinu commented 4 years ago

FWIW, I have seen this stringp error in the past as well. Very rarely. But I cannot reproduce it now, whatever I try.