Re: [O] [Babel] [possible bug] Empty src block prevents other block to expand

2014-06-23 Thread Nicolas Girard
2014-06-23 17:56 GMT+02:00 Charles Berry :
> Nicolas Girard  gmail.com> writes:
>
>
> I think the diagnosis is incorrect.
>
> The empty source block has no effect.
>
> Adding ':noweb yes' to `capture's header args fixes things.
>

Charles,

thanks for your feedback.

I've always been under the assumption that, when block A references B
and B references C, then ":noweb yes" was only needed for block A. At
least, but perhaps I should double check, I'm pretty sure it's the way
I've been writing all my literal programming code until now.

So, in this specific example, ":noweb yes" shouldn't be necessary but
for the latest code block in the file.

Am I wrong ?

Cheers,
Nicolas



Re: [O] [Babel] [possible bug] Empty src block prevents other block to expand

2014-06-23 Thread Charles Berry
Nicolas Girard  gmail.com> writes:

> 
> The empty src block at the beginning of the following file prevents
> "capture-tmpl" to expand when tangling.
> 

I think the diagnosis is incorrect.

The empty source block has no effect.

Adding ':noweb yes' to `capture's header args fixes things.

org-version: 8.3-8-gce2359

Chuck


> 

[snip]

> #+name: capture
> #+begin_src emacs-lisp :tangle no

Add `:noweb yes' to the previous line

>   ("C" "Capture" entry "
>   <>")
> #+end_src
> 
> #+begin_src emacs-lisp :noweb yes
>   (add-to-list 'org-capture-templates '
>   <> 'append)
> #+end_src
> ---8<---
> 
[snip]





[O] [Babel] [possible bug] Empty src block prevents other block to expand

2014-06-22 Thread Nicolas Girard
The empty src block at the beginning of the following file prevents
"capture-tmpl" to expand when tangling.

Admittedly, this empty src block shouldn't exist in the first place,
it's just a residue of some former confg of mine that didn't cause any
problem until I upgraded Org to the latest ELPA package
(8.2.7a-elpaplus -- 20140619).

The test file is
---8<---
* Empty org block
#+begin_src org :noweb yes
#+end_src
* Other blocks
#+name: capture-tmpl
#+begin_src org :results value
  ,* A
  :PROPERTIES:
  :ID: %(org-id-new)
  :END:
#+end_src

#+name: capture
#+begin_src emacs-lisp :tangle no
  ("C" "Capture" entry "
  <>")
#+end_src

#+begin_src emacs-lisp :noweb yes
  (add-to-list 'org-capture-templates '
  <> 'append)
#+end_src
---8<---

And the Makefile I used is simply
---8<---
all: conf.el

%.el: %.org
emacs --batch -Q -l ob-tangle -l ob-org \
--eval '(setq org-babel-use-quick-and-dirty-noweb-expansion t)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(org-babel-tangle-file "$<" "$@" "emacs-lisp")'
---8<---


Cheers,

Nicolas