From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id tp2xG5K8oF5WdQAA0tVLHw (envelope-from ) for ; Wed, 22 Apr 2020 21:52:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wDXcFJi8oF5jAQAA1q6Kng (envelope-from ) for ; Wed, 22 Apr 2020 21:52:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 96455942633 for ; Wed, 22 Apr 2020 21:52:23 +0000 (UTC) Received: from localhost ([::1]:58508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNI5-0002xf-JK for larch@yhetil.org; Wed, 22 Apr 2020 17:52:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52968) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNHk-0002xX-PX for emacs-orgmode@gnu.org; Wed, 22 Apr 2020 17:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNHj-0003e8-Kc for emacs-orgmode@gnu.org; Wed, 22 Apr 2020 17:52:00 -0400 Received: from hiwela.pair.com ([209.68.5.201]:25939) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jRNHj-0003VZ-6w for emacs-orgmode@gnu.org; Wed, 22 Apr 2020 17:51:59 -0400 Received: from hiwela.pair.com (localhost [127.0.0.1]) by hiwela.pair.com (Postfix) with ESMTP id 323D69804D2; Wed, 22 Apr 2020 17:51:57 -0400 (EDT) Received: from minshall-entroware-apollo.cliq.com (unknown [70.134.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hiwela.pair.com (Postfix) with ESMTPSA id ECE598F0849; Wed, 22 Apr 2020 17:51:56 -0400 (EDT) Received: from apollo2.minshall.org (localhost [IPv6:::1]) by minshall-entroware-apollo.cliq.com (Postfix) with ESMTP id 3AEB860D62; Wed, 22 Apr 2020 14:51:56 -0700 (PDT) From: Greg Minshall To: Nicolas Goaziou Subject: Re: babel/noweb concatenation of equally-named code blocks fails? In-reply-to: Your message of "Wed, 22 Apr 2020 19:09:09 +0200." <87imhrmoqy.fsf@nicolasgoaziou.fr> X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1303802.1587592316.1@apollo2.minshall.org> Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Apr 2020 14:51:56 -0700 Message-ID: <1303803.1587592316@apollo2.minshall.org> Received-SPF: softfail client-ip=209.68.5.201; envelope-from=minshall@umich.edu; helo=hiwela.pair.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 17:51:57 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Received-From: 209.68.5.201 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -0.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=umich.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-0.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.56491575371362]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.22), country: US(-0.00), ip: 209.51.188.17(-0.56)]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[209.51.188.17:from]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[minshall@umich.edu,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[acm.org:email]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[umich.edu : SPF not aligned (relaxed), No valid DKIM,none] X-TUID: Pa0dcEH8mGjj Nicolas, below is a format-patch. i signed FSF papers for emacs a number of years ago (and for gawk more recently). cheers, Greg =46rom e2d440186ccf62216406abb440455edbac72ba79 Mon Sep 17 00:00:00 2001 From: Greg Minshall Date: Wed, 22 Apr 2020 14:45:52 -0700 Subject: [PATCH] some clarification on <>, #+name:, :noweb-ref --- doc/org-manual.org | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 2a2700739..1c4a1f954 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -17988,12 +17988,13 @@ using a noweb[fn:145] style syntax: : <> = #+texinfo: @noindent -where {{{var(CODE-BLOCK-ID)}}} refers to either the =3DNAME=3D of -a specific source code block, or a collection of source code blocks +where {{{var(CODE-BLOCK-ID)}}} refers to either the =3DNAME=3D of = +a single source code block, or a collection of one or more source code bl= ocks sharing the same =3Dnoweb-ref=3D header argument (see [[*Using Header -Arguments]]). Org can replace such references with the source code---or -concatenation thereof--- being referenced, or with the results of an -evaluation. +Arguments]]). Org can replace such references with the source code of +the block or blocks being referenced, or, in the case of a single +source code block named with =3DNAME=3D, with the results of an +evaluation of that block. = #+cindex: @samp{noweb}, header argument The =3Dnoweb=3D header argument controls expansion of noweb syntax @@ -18056,9 +18057,9 @@ the second code block is expanded as ,#+END_SRC #+end_example = -You may also concatenate the contents of multiple blocks sharing -a common =3Dnoweb-ref=3D header argument. For simple concatenation, set -its value at the sub-tree or file level. In the example Org file +You may also include the contents of multiple blocks sharing +a common =3Dnoweb-ref=3D header argument, which can be set at the file, +sub-tree, or code-block level. In the example Org file shown next, the body of the source code in each block is extracted for concatenation to a pure code file when tangled. = @@ -18091,19 +18092,19 @@ concatenation to a pure code file when tangled. By default a newline separates each noweb reference concatenation. To use a different separator, edit the =3Dnoweb-sep=3D header argument. = -Eventually, Org can include the results of evaluation of a single code -block rather than its body. To that effect, append parentheses, -possibly including arguments, to the code block name, as shown below. +Alternatively, Org can include the results of evaluation of a single code +block rather than its body. Evaluation occurs when parentheses, +possibly including arguments, are appended to the code block name, as sho= wn below. = : <> = -Note that when using the above approach to a code block's results, the +Note that in this case, a code block name set by =3DNAME=3D keyword is required; the reference set -by =3Dnoweb-ref=3D is not effective in that case. +by =3Dnoweb-ref=3D will not work when evaluation is desired. = Here is an example that demonstrates how the exported content changes when noweb style references are used with parentheses versus without. -With: +Given: = #+begin_example ,#+NAME: some-code -- = 2.26.0