[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Literate Programming - Continue a Source Block?
From: |
Eric Schulte |
Subject: |
Re: [O] Literate Programming - Continue a Source Block? |
Date: |
Wed, 15 Jun 2011 10:27:25 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Neeum,
You are correct, the current implementation only specially concatenates
blocks during tangling, *not* during noweb resolution.
It would be possible to also implement the concatenation behavior during
noweb expansion, however I'd prefer to first wait for a response to my
recent other email to this thread asking for a more clear explication of
existing noweb behavior.
The only remaining times when such concatenation behavior could be
implemented would be during block reference expansion, and during block
evaluation, but I think expanding at those times would be unnecessary
and confusing.
Thanks -- Eric
Neeum Zawan <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>> Could you try the attached example file? I first evaluated the
>> following elisp code to set the combination variable's value to append.
>
> Your example works if there are no noweb references.
>
> See the modified one where I have noweb references. Note that when
> expanding the reference, it inserts only the first block it finds.
>
>
>
>
> #+begin_src emacs-lisp :tangle yes :noweb yes
> <<foo>>
>
> Random text
>
> <<bar>>
> #+end_src
>
>
>
> * continued code blocks
> :PROPERTIES:
> :tangle: yes
> :comments: yes
> :END:
> #+srcname: foo
> #+begin_src emacs-lisp
> (message "foo:%S" 1)
> #+end_src
>
> #+begin_src emacs-lisp
> (message "un-named")
> #+end_src
> #+srcname: bar
> #+begin_src emacs-lisp
> (message "bar:%S" 1)
> #+end_src
>
> #+srcname: foo
> #+begin_src emacs-lisp
> (message "foo:%S" 2)
> #+end_src
>
> #+srcname: bar
> #+begin_src emacs-lisp
> (message "bar:%S" 2)
> #+end_src
>
> #+begin_src emacs-lisp :tangle no :results silent
> (with-temp-buffer
> (insert-file-contents "scraps.el")
> (eval-buffer))
> #+end_src
--
Eric Schulte
http://cs.unm.edu/~eschulte/
- Re: [O] Literate Programming - Continue a Source Block?, (continued)
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/10
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/10
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/11
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/12
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/13
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?,
Eric Schulte <=
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/15
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/16
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Eric Schulte, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Sebastien Vauban, 2011/06/17
- Re: [O] Literate Programming - Continue a Source Block?, Neeum Zawan, 2011/06/19
- Re: [O] Literate Programming - Continue a Source Block?, Olaf.Hamann, 2011/06/16