From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: [BUG] Re: header argument :noweb-ref seems can't be resolved Date: Tue, 19 Dec 2017 17:49:50 +0000 Message-ID: <3763D550-0C04-4B8A-B329-582D16D3961A@ucsd.edu> References: <65580a97-24c4-a54c-655f-c37fcddd2cd1@gmail.com> <580C6094-17BE-44C7-8F4C-8BAF3113AA40@ucsd.edu> <8C1BE6FC-D004-49A9-82F5-03181061E848@ucsd.edu> <65375b87-03d9-45bb-6529-f5473c4d6af7@gmail.com> <16cda4c5-1612-145d-9cd4-aa3facbf1363@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRM1d-0004lF-Sj for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 12:49:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRM1a-0004Go-57 for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 12:49:57 -0500 Received: from iport-bcv4-out.ucsd.edu ([132.239.0.122]:1991) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRM1Z-0004Fx-LM for emacs-orgmode@gnu.org; Tue, 19 Dec 2017 12:49:54 -0500 In-Reply-To: <16cda4c5-1612-145d-9cd4-aa3facbf1363@gmail.com> Content-Language: en-US Content-ID: 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" To: stardiviner Cc: emacs-org-mode > On Dec 18, 2017, at 11:31 PM, stardiviner wrote: >=20 > Confirmed. I don't know how to fix this problem, so maybe report to Org-m= ode ML is the better way. (I changed the message title by prepend [BUG]) I guess I was unclear. There are two ways to fix this. 1) let bind org-babel-current-src-block-location in org-babel-expand-noweb-= references in the loop that scans for noweb-ref'ed src blocks. This fixes = the bug, but contradicts the docstring for o-b-c-s-b-l, which says it is th= e location of the currently executing src block. Maybe not a big deal, sinc= e `org-babel-exp-src-block' can export blocks that are not actually execute= d which is another contradiction of the docstring. Maybe change the docstri= ng.=20 2) rewrite org-babel-params-from-properties to add an optional arg `src-blo= ck-location' and use it when provided to govern where to look up properties= . Modify `org-babel-get-src-block-info' accordingly to add that arg when c= alling o-b-p-f-p. This honors the use of o-b-c-s-b-l as the location of th= e executing src block, but inflates the code to accommodate just the `noweb= -ref' case. =20 I think `2' is better as it makes clearer where o-b-p-f-p is looking for pr= operties when reading the code of org-babel-get-src-block-info. Chuck=