Re: [O] Emacs unresponsive while executing Sh code block
Giacomo M writes: > Dear all, > when I C-c C-c in: > > #+BEGIN_SRC sh > gnome-terminal > #+END_SRC > One additional note - you can start the gnome-terminal process in the background: #+BEGIN_SRC sh gnome-terminal & #+END_SRC The shell will not wait for the process to finish and emacs will not hang. -- Nick
Re: [O] Emacs unresponsive while executing Sh code block
Giacomo M writes: > Dear all, > when I C-c C-c in: > > #+BEGIN_SRC sh > gnome-terminal > #+END_SRC > > a gnome-terminal window appears, but Emacs hangs until I close it. > In the *Messages* I get: > > executing Sh code block... > Wrote /tmp/babel-2307H-J/ob-input-2307i3c > (here Emacs hangs...then I close gnome-terminal) > Error reading results: (beginning-of-buffer) > Code block produced no output. > What exactly were you expecting? If you open a terminal window and start, say, firefox from it, the terminal window will "hang" until you close firefox - then you get another prompt and can give it some more input. This is no different. It would be nice if emacs were multithreaded, but it isn't (at least not yet). > If I use emacs -Q ( evaluating just (org-babel-do-load-languages > 'org-babel-load-languages '((sh . t))) ) this doesn't happen. > When you say "this" doesn't happen, what do you meant by "this"? How does this example compare with the previous example? They look completely different to me. -- Nick
Re: [O] Emacs unresponsive while executing Sh code block
On 2015-03-06T05:40:33+1100, Giacomo M said: GM> Dear all, GM> when I C-c C-c in: #+BEGIN_SRC sh gnome-terminal #+END_SRC GM> a gnome-terminal window appears, but Emacs hangs until I close GM> it. In the *Messages* I get: GM> executing Sh code block... Wrote GM> /tmp/babel-2307H-J/ob-input-2307i3c (here Emacs hangs... then GM> I close gnome-terminal) Error reading results: GM> (beginning-of-buffer) Code block produced no output. My guess is that Emacs is waiting for the final output from `gnome-terminal`, which doesn't get sent until you close `gnome-terminal`. Alexis.