emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Explicitly mention when a language-mode throws an error
@ 2010-09-07 23:38 Eric Schulte
  2010-09-14 12:03 ` [Accepted] " Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Schulte @ 2010-09-07 23:38 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: explicit-lang-mode-errors.patch --]
[-- Type: text/x-diff, Size: 649 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Accepted] Explicitly mention when a language-mode throws an error
  2010-09-07 23:38 Explicitly mention when a language-mode throws an error Eric Schulte
@ 2010-09-14 12:03 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2010-09-14 12:03 UTC (permalink / raw)
  To: emacs-orgmode

Patch 263 (http://patchwork.newartisans.com/patch/263/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87sk1luntu.fsf%40gmail.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Explicitly mention when a language-mode throws an error
> Date: Wed, 08 Sep 2010 04:38:05 -0000
> From: Eric Schulte <schulte.eric@gmail.com>
> X-Patchwork-Id: 263
> Message-Id: <87sk1luntu.fsf@gmail.com>
> To: Org Mode <emacs-orgmode@gnu.org>
> 
> 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)
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-14 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 23:38 Explicitly mention when a language-mode throws an error Eric Schulte
2010-09-14 12:03 ` [Accepted] " Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).