emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Levin Du <zslevin@gmail.com>
To: Org-mode Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] minor patch to org-babel-load-file
Date: Tue, 18 Jun 2013 15:44:20 +0800	[thread overview]
Message-ID: <CAN6cQGPSUEKPy-WFkC2Sd98XOmFHkpSGMdyETbyMh+hXxvUaPQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2013-06-18  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  7:44 Levin Du [this message]
2013-06-18  8:14 ` [PATCH] minor patch to org-babel-load-file Michael Brand
2013-06-20 15:58   ` Eric Schulte
2013-06-20 16:37     ` Michael Brand
2013-06-20 18:00     ` Achim Gratz

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=CAN6cQGPSUEKPy-WFkC2Sd98XOmFHkpSGMdyETbyMh+hXxvUaPQ@mail.gmail.com \
    --to=zslevin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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