From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Explicitly mention when a language-mode throws an error Date: Tue, 07 Sep 2010 17:38:05 -0600 Message-ID: <87sk1luntu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=34657 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ot7jw-0001cV-Mv for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:38:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ot7jv-00054C-Jr for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:38:12 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:65464) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ot7jv-000547-Dx for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 19:38:11 -0400 Received: by iwn33 with SMTP id 33so8411097iwn.0 for ; Tue, 07 Sep 2010 16:38:10 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --=-=-= 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=explicit-lang-mode-errors.patch 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) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--