org-babel-eval: compilation-mode to deal with errors in (C/C++/D)

This commit is contained in:
Ernesto Durante 2014-08-25 17:27:24 +02:00 committed by Eric Schulte
parent 92aeca04b2
commit e4e80bfa33
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ STDERR with `org-babel-eval-error-notify'."
(progn
(with-current-buffer err-buff
(org-babel-eval-error-notify exit-code (buffer-string)))
(save-excursion
(when (get-buffer org-babel-error-buffer-name)
(with-current-buffer org-babel-error-buffer-name
(compilation-mode)
;;compilation-mode enforces read-only
(read-only-mode 0))))
nil)
(buffer-string)))))