emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: aditya siram <aditya.siram@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [Babel] Language Mode Error Stops Tangling Process, Fix Attached
Date: Mon, 4 Jul 2011 14:48:55 -0500	[thread overview]
Message-ID: <CAJrReygJTqLKFTMYLOHu8QD0RQ+BtnG8Hg0O2hL21ajQQNit2Q@mail.gmail.com> (raw)

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


[-- 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
-                      (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)))

             reply	other threads:[~2011-07-04 19:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 19:48 aditya siram [this message]
2011-07-04 21:00 ` [Babel] Language Mode Error Stops Tangling Process, Fix Attached Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJrReygJTqLKFTMYLOHu8QD0RQ+BtnG8Hg0O2hL21ajQQNit2Q@mail.gmail.com \
    --to=aditya.siram@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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