emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel] [possible bug] Empty src block prevents other block to expand
@ 2014-06-22 17:52 Nicolas Girard
  2014-06-23 15:56 ` Charles Berry
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Girard @ 2014-06-22 17:52 UTC (permalink / raw)
  To: emacs-orgmode

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 "
  <<capture-tmpl>>")
#+end_src

#+begin_src emacs-lisp :noweb yes
  (add-to-list 'org-capture-templates '
  <<capture>> '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

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

* Re: [Babel] [possible bug] Empty src block prevents other block to expand
  2014-06-22 17:52 [Babel] [possible bug] Empty src block prevents other block to expand Nicolas Girard
@ 2014-06-23 15:56 ` Charles Berry
  2014-06-23 16:20   ` Nicolas Girard
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Berry @ 2014-06-23 15:56 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Girard <girard.nicolas <at> 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 "
>   <<capture-tmpl>>")
> #+end_src
> 
> #+begin_src emacs-lisp :noweb yes
>   (add-to-list 'org-capture-templates '
>   <<capture>> 'append)
> #+end_src
> ---8<-------
> 
[snip]

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

* Re: [Babel] [possible bug] Empty src block prevents other block to expand
  2014-06-23 15:56 ` Charles Berry
@ 2014-06-23 16:20   ` Nicolas Girard
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Girard @ 2014-06-23 16:20 UTC (permalink / raw)
  To: Charles Berry; +Cc: emacs-orgmode

2014-06-23 17:56 GMT+02:00 Charles Berry <ccberry@ucsd.edu>:
> Nicolas Girard <girard.nicolas <at> 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

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

end of thread, other threads:[~2014-06-23 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-22 17:52 [Babel] [possible bug] Empty src block prevents other block to expand Nicolas Girard
2014-06-23 15:56 ` Charles Berry
2014-06-23 16:20   ` Nicolas Girard

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