emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel] Language Mode Error Stops Tangling Process, Fix Attached
@ 2011-07-04 19:48 aditya siram
  2011-07-04 21:00 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: aditya siram @ 2011-07-04 19:48 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi all,
I was running into an issue where "lua-mode" would throw an error that
stopped "org-babel-tangle" function in "ob-tangle.el". I have patched
"org-babel-tangle" to ignore errors thrown by invoking any language's
mode. The patch is attached.

-deech

[-- Attachment #2: ignore-errors-when-launching-a-languages-mode-when-tangling.patch --]
[-- Type: text/x-diff, Size: 1146 bytes --]

From 2093523c672b83d53d9eca3680cb10682784dfaf Mon Sep 17 00:00:00 2001
From: Deech <deech@deech-ThinkPad-X200.(none)>
Date: Mon, 4 Jul 2011 14:42:03 -0500
Subject: [PATCH 2/2] Ignore errors when launching a language's mode when tangling a source block. The lua-mode for instance was throwing errors that killed the tangling process.

---
 lisp/ob-tangle.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 723fba1..5acacc2 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -230,7 +230,7 @@ exported source code blocks by language."
                       (delete-file file-name))
                     ;; drop source-block to file
                     (with-temp-buffer
-                      (when (fboundp lang-f) (ignore-errors (message "hello") (funcall lang-f)))
+                      (when (fboundp lang-f) (ignore-errors (funcall lang-f)))
                       (when (and she-bang (not (member file-name she-banged)))
                         (insert (concat she-bang "\n"))
                         (setq she-banged (cons file-name she-banged)))
-- 
1.7.4.1


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

* Re: [Babel] Language Mode Error Stops Tangling Process, Fix Attached
  2011-07-04 19:48 [Babel] Language Mode Error Stops Tangling Process, Fix Attached aditya siram
@ 2011-07-04 21:00 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2011-07-04 21:00 UTC (permalink / raw)
  To: aditya siram; +Cc: emacs-orgmode

aditya siram <aditya.siram@gmail.com> writes:

> Hi all,
> I was running into an issue where "lua-mode" would throw an error that
> stopped "org-babel-tangle" function in "ob-tangle.el". I have patched
> "org-babel-tangle" to ignore errors thrown by invoking any language's
> mode. The patch is attached.
>
> -deech
>

Hi Deech,

Thanks for the patch, I just applied a slightly fixed version.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

end of thread, other threads:[~2011-07-04 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 19:48 [Babel] Language Mode Error Stops Tangling Process, Fix Attached aditya siram
2011-07-04 21:00 ` Eric Schulte

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).