all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] minor patch to org-babel-load-file
@ 2013-06-18  7:44 Levin Du
  2013-06-18  8:14 ` Michael Brand
  0 siblings, 1 reply; 5+ messages in thread
From: Levin Du @ 2013-06-18  7:44 UTC (permalink / raw)
  To: Org-mode Mode

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

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

[-- Attachment #2: Type: text/html, Size: 1849 bytes --]

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

end of thread, other threads:[~2013-06-20 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  7:44 [PATCH] minor patch to org-babel-load-file Levin Du
2013-06-18  8:14 ` Michael Brand
2013-06-20 15:58   ` Eric Schulte
2013-06-20 16:37     ` Michael Brand
2013-06-20 18:00     ` Achim Gratz

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.