From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Irrelevant src blocks can break noweb expansion Date: Tue, 12 Dec 2017 08:42:55 +0100 Message-ID: <87o9n4wfwg.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOfDP-0001Vk-Cb for emacs-orgmode@gnu.org; Tue, 12 Dec 2017 02:43:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOfDO-0003qs-GN for emacs-orgmode@gnu.org; Tue, 12 Dec 2017 02:42:59 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:34974) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eOfDO-0003ol-A7 for emacs-orgmode@gnu.org; Tue, 12 Dec 2017 02:42:58 -0500 In-Reply-To: (Charles Berry's message of "Mon, 11 Dec 2017 03:13:41 +0000") 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: "Berry, Charles" Cc: emacs-org list Hello, "Berry, Charles" writes: > I used to avoid this by `(setq org-babel-use-quick-and-dirty-noweb-expansion t)'. > > This illustrates the issue: > > #+begin_src org > > ,* abc > > ,#+begin_src R :comment (message "running on empty") > > ,#+end_src > > ,#+begin_src R :noweb yes > 1 > ,#+end_src > > > #+end_src > > The irrelevant, unnamed, empty src block its consulted via > org-babel-get-src-block-info. When? AFAICT, the second block doesn't contain any Noweb reference, so there is nothing to consult in the first place. IOW, something is missing in your recipe. Also, `org-babel-use-quick-and-dirty-noweb-expansion' was intended to skip properties check when collecting Noweb references from the buffer. I.e., Org would only trust "name" keyword and ":noweb-ref" header argument. Since there is no property in your example, I fail to see why `org-babel-use-quick-and-dirty-noweb-expansion' would apply here. Regards, -- Nicolas Goaziou