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

2015-04-23 Thread Sam Ritchie
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


[O] Image #s and captions missing in Org 8 Latex Export

2013-05-06 Thread Sam Ritchie
Hey all,

I've just upgraded to org 8 (from 7.9) and am running into an issue with my
latex export.  I can't get captions to show up on the results of a code
block evaluation, or reference those results with, for example
[[fig:graph]]:

#+caption: Graphviz Example
#+name: fig:graph
#+BEGIN_SRC dot :exports results :file graph.png :eval yes :cmdline -Kdot
-Tpng
digraph data_relationships {
  org-mode
  org-exp-blocks
  dot
  ditaa
  HTML [shape=Mrecord, label={HTML|publish on the web\l}]
  LaTeX [shape=Mrecord, label={LaTeX|publish in PDF\l}]
  org-mode - org-exp-blocks
  dot - org-mode
  ditaa - org-mode
  org-exp-blocks - HTML
  org-exp-blocks - LaTeX
 }
(+ 2 2)
#+END_SRC

Captions and internal links to actual code listings are working great:

#+caption: Hello, World in Clojure
#+name: fig:hello
#+BEGIN_SRC clojure :exports code :eval no
  (println Hello, World!)
#+END_SRC

[[fig:hello]] resolves to 1, as expected, and the caption shows up in
HTML export and in the Latex export as Figure 1: Hello, World in Clojure.

In org 7.9, my captions resolved on the png results but would never show up
on code exports. Is there some option flag I need to enable to generate
refs for embedded PNGs?

Thanks!
Sam

-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

(Too brief? Here's why! http://emailcharter.org)


Re: [O] Image #s and captions missing in Org 8 Latex Export

2013-05-06 Thread Sam Ritchie
Hey, excellent, that 
works. Thanks so much!


   	   
   	Nicolas Goaziou  
  May 6, 2013 1:52 
PM
  Hello,You
 need to apply CAPTION and NAME keywords on the results, not thesource
 code.Regards,
   	   
   	Sam Ritchie  
  May 6, 2013 10:40
 AM
  Hey all,I've
 just upgraded to org 8 (from 7.9) and am running into an issue with my 
latex export. I can't get captions to show up on the results of a code 
block evaluation, or reference those results with, for example 
[[fig:graph]]:
#+caption: Graphviz Example#+name: 
fig:graph#+BEGIN_SRC dot :exports results :file graph.png 
:eval yes :cmdline -Kdot -Tpngdigraph data_relationships {
 "org-mode"
 "org-exp-blocks" "dot" "ditaa"
 "HTML" [shape=Mrecord, label="{HTML|publish on the web\l}"]
 "LaTeX" [shape=Mrecord, label="{LaTeX|publish in PDF\l}"]
 "org-mode" - "org-exp-blocks" "dot" - 
"org-mode" "ditaa" - "org-mode" 
"org-exp-blocks" - "HTML"
 "org-exp-blocks" - LaTeX}(+ 2 2)#+END_SRCCaptions
 and internal links to actual code listings are working great:
#+caption: Hello, World in Clojure#+name: fig:hello#+BEGIN_SRC
 clojure :exports code :eval no (println "Hello, World!")#+END_SRC[[fig:hello]]
 resolves to "1", as expected, and the caption shows up in HTML export 
and in the Latex export as "Figure 1: Hello, World in Clojure".
In org 7.9, my captions resolved on the png
 results but would never show up on code exports. Is there some option 
flag I need to enable to generate refs for embedded PNGs?
Thanks!Sam-- Sam Ritchie, Twitter Inc
703.662.1337@sritchie
(Too brief? Here's why! http://emailcharter.org)



  


-- Sam Ritchie, Twitter Inc


703.662.1337


@sritchie