From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: [babel] noweb syntax Date: Sat, 31 Oct 2009 08:15:37 -1000 Message-ID: <28BF59BE-7FF8-4DFB-BD6E-A224D9A133BA@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1589385877==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4IUN-0004bF-KL for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 14:15:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4IUJ-0004YY-05 for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 14:15:47 -0400 Received: from [199.232.76.173] (port=50139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4IUI-0004YQ-T5 for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 14:15:42 -0400 Received: from outbound-mail-159.bluehost.com ([67.222.39.39]:48930) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N4IUI-000714-Ff for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 14:15:42 -0400 Received: from cpe-24-161-159-72.hawaii.res.rr.com ([24.161.159.72] helo=[192.168.1.2]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1N4IUE-000695-3c for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 12:15:38 -0600 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1589385877== Content-Type: multipart/alternative; boundary=Apple-Mail-29--467137006 --Apple-Mail-29--467137006 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Aloha all, The new expanded noweb syntax in org-babel is sensitive to line breaks. It looks to me as if it isn't possible to expand two noweb references on the same line. As the following example shows, there is a workaround that yields valid LaTeX source. Insensitivity to line breaks seems more intuitive to me, but I can live with the workaround if this is a feature and not a bug. --------------------------- org file --------------------------------- * test #+begin_src latex :tangle gobble This is tangled <>, and not this <>, but so this is. This is tangled <>, and so is this <>. #+end_src ** Python code #+srcname: a #+begin_src python 1 #+end_src #+resname: a : 1 #+srcname: b #+begin_src python 2 #+end_src #+resname: b : 2 -------------------------- gobble.tex --------------------------- % generated by org-babel-tangle % [[file:~/Public/projects/903_adzes/org-babel/test-babel.org::*test] [block-1]] This is tangled 1, but so this is. This is tangled 1, and so is this 2. % block-1 ends here All the best, Tom Thomas S. Dye, Ph.D. T. S. Dye & Colleagues, Archaeologists, Inc. Phone: (808) 529-0866 Fax: (808) 529-0884 http://www.tsdye.com --Apple-Mail-29--467137006 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Aloha = all,

The new expanded noweb syntax in org-babel is = sensitive to line breaks.  It looks to me as if it isn't possible = to expand two noweb references on the same line.  As the following = example shows, there is a workaround that yields valid LaTeX source. =   Insensitivity to line breaks seems more intuitive to me, but I = can live with the workaround if this is a feature and not a = bug.

--------------------------- org file = ---------------------------------
* = test

#+begin_src latex :tangle = gobble
  This is tangled <<a()>>, and = not this <<b()>>, but so this is.
  This = is tangled <<a()>>, 
  and so is = this = <<b()>>.
#+end_src

** = Python code

#+srcname: a
#+begin_src = python
1
#+end_src 

#+re= sname: a
: 1

#+srcname: = b
#+begin_src = python
2
#+end_src 

#+re= sname: b
: = 2

-------------------------- gobble.tex = ---------------------------

% generated by = org-babel-tangle

% = [[file:~/Public/projects/903_adzes/org-babel/test-babel.org::*test][block-= 1]]
This is tangled 1, but so this is.
This is = tangled 1, 
and so is this 2.
% block-1 ends = here

All the = best,
Tom

Thomas S. Dye, Ph.D.

T. S. Dye & Colleagues, = Archaeologists, Inc.

Phone: (808) 529-0866 Fax: (808) 529-0884

=

= --Apple-Mail-29--467137006-- --===============1589385877== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1589385877==--