I removed my .emacs
and .emacs.d
, then created a new .emacs
consisting of only the essential to use R and a shell with org-babel to make sure my configs weren't causing this:
(require 'org-install)
(org-babel-do-load-languages
'org-babel-load-languages
'(
(sh . t)
(R . t)
))
When I try to run the following snippet:
#+begin_src R :results output verbatim
(any R code)
#+end_src
It runs just fine. However, if I add :session
or :session name
to the #+begin_src
header, Emacs freezes. I can't move the cursor nor do anything. I can see both R and Emacs on htop
, none using any CPU. The only way to get out is to send SIGTERM
to Emacs.
When running the snippet with C-c
the minibuffer says:
ESS (*R*, R (newest)) starting data directory? pwd (I say yes)
Cannot read history file pwd/.Rhistory
This is normal, I get it on other computers where Emacs doesn't freeze. Then hangs forever on
ess-tracebug mode enabled
Also normal. Except the hanging forever part.
A similar issue occurs with sh snippets:
#+begin_src sh :results output verbatim
echo
#+end_src
Works fine. So with :session
. However, with :session name
it hangs forever just like R. All the minibuffer says is
Wrote /tmp/babel-XXXXX
And then hangs forever on
executing sh code block...
All packages (emacs
, ess
, org-mode
) are the latest version from Debian stable repos. I have other computers with the same setup that work just fine. emacs --version
returns GNU Emacs 24.4.1
. The same happened in previous versions, and I also tried downloading Emacs 24.5.1
from a GNU mirror and compiling it. The exact same thing happens. I'm completely lost as to what could be causing this.
P.S.:
Also tried downloading latest stable ess and org-mode from the respective websites and installing and configuring for the compiled emacs. Added
(add-to-list 'load-path "/path/to/emacs-24.5/b/share/emacs/site-lisp/ess")
(load "ess-site")
To .emacs
as per ess' README