emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: stardiviner <numbchild@gmail.com>
Cc: emacs-org-mode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Re: header argument :noweb-ref seems can't be resolved
Date: Tue, 19 Dec 2017 17:49:50 +0000	[thread overview]
Message-ID: <3763D550-0C04-4B8A-B329-582D16D3961A@ucsd.edu> (raw)
In-Reply-To: <16cda4c5-1612-145d-9cd4-aa3facbf1363@gmail.com>



> On Dec 18, 2017, at 11:31 PM, stardiviner <numbchild@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	other threads:[~2017-12-19 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-17 14:58 header argument :noweb-ref seems can't be resolved stardiviner
2017-12-17 17:40 ` Berry, Charles
2017-12-18  2:08   ` stardiviner
2017-12-18  4:12     ` Berry, Charles
2017-12-18  4:28       ` stardiviner
2017-12-18 16:46         ` Berry, Charles
2017-12-18 17:28           ` numbchild
2017-12-19  4:59             ` Berry, Charles
2017-12-19  7:31               ` [BUG] " stardiviner
2017-12-19 17:49                 ` Berry, Charles [this message]
2017-12-19 19:00                   ` Nicolas Goaziou
2017-12-20  5:32                     ` Berry, Charles
2017-12-20 12:23                       ` Nicolas Goaziou
2017-12-20 15:41                         ` numbchild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3763D550-0C04-4B8A-B329-582D16D3961A@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).