From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yHagG6s8J2DqSAAA0tVLHw (envelope-from ) for ; Sat, 13 Feb 2021 02:42:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +FtTF6s8J2BefAAAB5/wlQ (envelope-from ) for ; Sat, 13 Feb 2021 02:42:51 +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 D2F911A200 for ; Sat, 13 Feb 2021 03:42:50 +0100 (CET) Received: from localhost ([::1]:35178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAktW-00030U-2O for larch@yhetil.org; Fri, 12 Feb 2021 21:42:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAksZ-00030J-83 for emacs-orgmode@gnu.org; Fri, 12 Feb 2021 21:41:51 -0500 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:40938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAksV-0003Zp-Jf for emacs-orgmode@gnu.org; Fri, 12 Feb 2021 21:41:50 -0500 Received: by mail-qk1-x72d.google.com with SMTP id t62so1562079qke.7 for ; Fri, 12 Feb 2021 18:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=bKpAGOWxYdxy2IvEEX3o9lGhR9IXpt/bU68Lkjh6hsU=; b=sKuYHf9aUyDfZBFOix/ZJFloZZEI7zQZb8gR7Kzn0OhMgtFlsHCRWz7ahp0J4ttKcS qXEszGhoIPO5cL5kP7KqpgQh0s5DJI1VOSvqrKTwVKF61ZW7K4yck6Dc+gxgFAZbTcGs X6/Ct1SyS5rXZkMRelBb3Y5OAxxjgHhFoT9FdfLIule3Lu0wkQtF6X24oGSyU9wGP1HR TVO/Qb1U65t2/7TvPPEvk8ZF2bisTpAQ5NNYKPPMC7zD/WjZKlhvNl+avTmMD0UP/wPm AI2OAIygLCD7bHimtVATJCkZbYYXN2tguaGsqsbZniOHtxrTzAVOayRHuBFUySM4vu1h tCmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bKpAGOWxYdxy2IvEEX3o9lGhR9IXpt/bU68Lkjh6hsU=; b=ATa96KxLYSrFniuDA7/uixRZyy7347gnq9snOVo8qY8HwMGNTTC3qi5eY2e4NxPLkW e7vhcOzBF7KC5fVlYC2F3p7y0Np/hXxp2a5c9axc+1C7UMjAh59hPOjZA/RbtX1eswBd htdDp6RGWBL5HJTZkfFCR9tGjwTHXcksZ0wNYSob/bPTO2rcvcz76h69EBMf4YPeU1pk YiYgyPePuSgvN7bTq8jyieFMRYDbaY5qSxiFNsP/n8k74yvHgeogqDIqx5Pc6hr5Wfde JhoT4LK6ylqaw1jrJJD2MKDMQCBA3/O/3nyCAlA8YEQLmrln0FuhOcI5Ed7FbtBTQZvB GTPw== X-Gm-Message-State: AOAM533nHeVNX64L55oLVWtv9lpygH3l74FzjH67G9mu4aw2mp5iORQp a/dFc16onZCahVhjQafYBux8ZBAaSmuWXw== X-Google-Smtp-Source: ABdhPJxTo/7Axa5vs/r1G1oyCtKTimYqQ9gLdmBqZR7Wgrr3Ykr6Y9yJcWPVYAccyk+enKZs2wU+UA== X-Received: by 2002:a05:620a:135c:: with SMTP id c28mr5353392qkl.441.1613184106024; Fri, 12 Feb 2021 18:41:46 -0800 (PST) Received: from cibola.cibola (pool-108-45-87-170.washdc.fios.verizon.net. [108.45.87.170]) by smtp.gmail.com with ESMTPSA id c17sm6842514qtn.71.2021.02.12.18.41.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 18:41:45 -0800 (PST) From: "Kevin M. Stout" X-Google-Original-From: "Kevin M. Stout" Date: Fri, 12 Feb 2021 21:41:43 -0500 To: emacs-orgmode@gnu.org Subject: Re: 2 Surprises and 2 Questions Regarding Org Tangle Message-ID: <20210213024143.GA14639@cibola.cibola> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=kevin.m.stout@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=sKuYHf9a; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: D2F911A200 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: n3fiJTyz1nfo On 2021-02-11 18:44, Diego Zamboni wrote: > #2 is known (maybe documented? Not sure) behavior: using :noweb-ref > accumulates multiple blocks with the same name, whereas #+NAME uses only > the first one. Deep in org-babel-tangle, = = = = = = =20 (org-babel-map-src-blocks nil = = = (let ((i (let ((org-babel-current-src-block-location (poin= t))) = = (org-babel-get-src-block-info 'lig= ht)))) = = (when (equal (or (cdr (assq :n= oweb-ref (nth 2 i))) = = = (nth 4 i)) = = = source-name) = = = ...))) So, while :noweb-ref gets priority over #+NAME, we can still accumulate blo= cks having the same #+NAME (provided there's no overriding :noweb-ref). > I think #+NAME's are supposed to be unique within a document. Even though I'm a huge fan of this behavior, which lines up well with the traditional WEB and Noweb behavior, the Org manual's discussion of code blo= cks does say, "For duplicate names, Org mode's behavior is undefined." [Section 14.1] So, Dear Org Maintainers, Please do not change org-babel-tangle's accumulation behavior for duplicate #+NAME's. It's handy, and users of other literate programming tools will fi= nd it familiar. Also, #+NAME is a nicer per-block syntax than :noweb-ref. Sincerely, Kevin M. Stout