emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] minor patch to org-babel-load-file


From: Levin Du
Subject: [O] [PATCH] minor patch to org-babel-load-file
Date: Tue, 18 Jun 2013 15:44:20 +0800

Hi, all

I find org-babel-load-file not work for my emacs-starter-kit  org file.
After some traces, I find that 

   (org-babel-merge-params nil nil nil)

returns:

   ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . ""))

which will override my default (:tangle "yes") value in org-babel-default-header-args
and org-babel-load-file simply don't tangle source blocks without ":tangle yes".

Below is the patch that solves this problem.

diff  a/lisp/ob-core.el b/lisp/ob-core.el
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2337,7 +2337,8 @@ parameters when merging lists."
      (lambda (hd)
        (let ((key (intern (concat ":" (symbol-name hd))))
      (val (eval hd)))
- (setf params (cons (cons key (mapconcat 'identity val " ")) params))))
+ (when val
+ (setf params (cons (cons key (mapconcat 'identity val " ")) params)))))
      '(results exports tangle noweb padline cache shebang comments))
     params))
 
--
Best Regards,
Levin

reply via email to

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