> On Dec 18, 2017, at 11:31 PM, stardiviner <numbch...@gmail.com> wrote:
> 
> Confirmed. I don't know how to fix this problem, so maybe report to Org-mode 
> 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 the location of the currently executing src block. Maybe not a 
big deal, since `org-babel-exp-src-block' can export blocks that are not 
actually executed which is another contradiction of the docstring. Maybe change 
the docstring. 

2) rewrite org-babel-params-from-properties to add an optional arg 
`src-block-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 calling o-b-p-f-p.  This honors the use of o-b-c-s-b-l as the location of 
the executing src block, but inflates the code to accommodate just the 
`noweb-ref' case.  

I think `2' is better as it makes clearer where o-b-p-f-p is looking for 
properties when reading the code of org-babel-get-src-block-info.

Chuck

Reply via email to