emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] fix for ignored header args in org-babel-tangle


From: Sam Ritchie
Subject: [O] [PATCH] fix for ignored header args in org-babel-tangle
Date: Sat, 18 Apr 2015 18:38:44 -0600
User-agent: Postbox 3.0.11 (Macintosh/20140602)

I found that all of my header arguments to source blocks were getting ignored. Moving the header-args into the let* binding seems to fix this issue, though I'm not enough of a guru to know why. Without this arguments like

#+BEGIN_SRC clojure :tangle ./project.clj

and

#+BEGIN_SRC clojure :tangle no

were getting ignored and substituted for ":tangle yes" along with other defaults.

Hope this patch is in the right format:

diff --git a/ob-core.el b/ob-core-old.el
index ba82d88..a6ffcc4 100644
--- a/ob-core.el
+++ b/ob-core-old.el
@@ -1368,14 +1368,7 @@ specified in the properties of the current outline entry."
             (or body "")))))
      (preserve-indentation (or org-src-preserve-indentation
                    (save-match-data
-                     (string-match "-i\\>" switches))))
-         (header-args (apply #'org-babel-merge-params
-                             org-babel-default-header-args
-                             (when (boundp lang-headers) (eval lang-headers))
-                             (append
-                              (org-babel-params-from-properties lang)
-                              (list (org-babel-parse-header-arguments
-                                     (org-no-properties (or (match-string 4) ""))))))))
+                     (string-match "-i\\>" switches)))))
     (list lang
           ;; get block body less properties, protective commas, and indentation
           (with-temp-buffer
@@ -1383,7 +1376,13 @@ specified in the properties of the current outline entry."
               (insert (org-unescape-code-in-string body))
           (unless preserve-indentation (org-do-remove-indentation))
               (buffer-string)))
-      header-args
+      (apply #'org-babel-merge-params
+         org-babel-default-header-args
+         (when (boundp lang-headers) (eval lang-headers))
+         (append
+          (org-babel-params-from-properties lang)
+          (list (org-babel-parse-header-arguments
+             (org-no-properties (or (match-string 4) ""))))))
       switches
       block-indentation)))
 


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com
Twitter // Facebook

reply via email to

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