summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Durante <edurante@localhost.localdomain>2014-08-25 17:27:24 +0200
committerEric Schulte <schulte.eric@gmail.com>2014-08-28 10:45:25 -0400
commite4e80bfa3377d4b07d58452be14ab1b314fac5fc (patch)
tree3f935c852bb5463d5ff3c7da2c4d42ab05f3bc19
parent92aeca04b2b94c96a678f17648907e8dc0806aba (diff)
downloadorg-mode-e4e80bfa3377d4b07d58452be14ab1b314fac5fc.tar.gz
org-babel-eval: compilation-mode to deal with errors in (C/C++/D)
-rw-r--r--lisp/ob-eval.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el
index 057590f..9fbbb42 100644
--- a/lisp/ob-eval.el
+++ b/lisp/ob-eval.el
@@ -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)))))