From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Literate Programming - Continue a Source Block? Date: Wed, 15 Jun 2011 10:27:25 -0700 Message-ID: <871uyvuhqy.fsf@gmail.com> References: <87pqmokh6d.fsf@fester.com> <80k4cw22uf.fsf@somewhere.org> <87fwnkjqoh.fsf@fester.com> <87mxhsnmcf.fsf@gmail.com> <877h8wj9za.fsf@fester.com> <877h8tv6yh.fsf@gmail.com> <87fwnhgps2.fsf@fester.com> <871uz0m8q9.fsf@gmail.com> <87oc238vby.fsf@fester.com> <87zkllie03.fsf@gmail.com> <871uyv7jxm.fsf@fester.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWtsy-0000bV-Uj for emacs-orgmode@gnu.org; Wed, 15 Jun 2011 13:28:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWtsw-0002R2-TZ for emacs-orgmode@gnu.org; Wed, 15 Jun 2011 13:28:12 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:41347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWtsw-0002Qd-H7 for emacs-orgmode@gnu.org; Wed, 15 Jun 2011 13:28:10 -0400 Received: by iyl8 with SMTP id 8so643158iyl.0 for ; Wed, 15 Jun 2011 10:28:09 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Neeum Zawan Cc: emacs-orgmode@gnu.org 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 writes: > Eric Schulte 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 > <> > > Random text > > <> > #+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/