emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] fix for ignored header args in org-babel-tangle
@ 2015-04-19  0:38 Sam Ritchie
  2015-04-23 19:55 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ritchie @ 2015-04-19  0:38 UTC (permalink / raw)
  To: emacs-orgmode

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

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 <http://www.paddleguru.com/>
Twitter <http://twitter.com/paddleguru>// Facebook 
<http://facebook.com/paddleguru>

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

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

end of thread, other threads:[~2015-04-24  1:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-19  0:38 [PATCH] fix for ignored header args in org-babel-tangle Sam Ritchie
2015-04-23 19:55 ` Nicolas Goaziou
2015-04-24  1:45   ` Charles C. Berry

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