emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Explicitly mention when a language-mode throws an error


From: Eric Schulte
Subject: [Orgmode] Explicitly mention when a language-mode throws an error
Date: Tue, 07 Sep 2010 17:38:05 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi,

The attached patch makes it clear when a language mode has thrown an
error.  This can clear up confusion whether an error is originating from
Org-mode or form the language-mode in question.

Should this be committed?

Best -- Eric

diff --git a/lisp/org-src.el b/lisp/org-src.el
index d1948cc..233058a 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -276,7 +276,10 @@ buffer."
        (unless preserve-indentation
          (setq total-nindent (or (org-do-remove-indentation) 0)))
        (let ((org-inhibit-startup t))
-         (funcall lang-f))
+         (condition-case e
+             (funcall lang-f)
+           (error
+            (error "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))
        (set (make-local-variable 'org-edit-src-force-single-line) single)
        (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
        (set (make-local-variable 'org-edit-src-allow-write-back-p) 
allow-write-back-p)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]