Hello, "Berry, Charles" writes: > 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. Since :noweb-ref is the only property that absolutely needs to be retrieved from definition, another option would be to write a specific function for that. It implies some duplicated efforts with `org-babel-get-src-block-info', but it is faster when the source name doesn't match, which is the most common case, and avoids all side-effects from `org-babel-get-src-block-info'. WDYT? Regards, -- Nicolas Goaziou