From mboxrd@z Thu Jan 1 00:00:00 1970 From: fm4d Subject: [BUG] Noweb reference eval syntax does not work Date: Thu, 05 May 2016 23:39:56 +0200 Message-ID: <87h9ec2ngz.fsf@fm4d.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayR0f-0001cq-3s for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayR0T-0001PS-EP for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:40:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:52506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayR0T-0001N5-8E for emacs-orgmode@gnu.org; Thu, 05 May 2016 17:40:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ayR0I-0002V4-W9 for emacs-orgmode@gnu.org; Thu, 05 May 2016 23:40:15 +0200 Received: from 221.210.broadband5.iol.cz ([88.100.210.221]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 May 2016 23:40:14 +0200 Received: from m by 221.210.broadband5.iol.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 May 2016 23:40:14 +0200 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: emacs-orgmode@gnu.org The noweb reference syntax that should insert results of evaluation of src block itself instead of src block as described in `org-babel-expand-noweb-reference` does not seems to work. Code for replication: * Assign First we assign abc: #+begin_src python :noweb-ref assign_abc abc = "abc" + "def" #+end_src * Use Then we use it in a function: #+begin_src python :noweb tangle :tangle noweb-test.py def x(): <> return abc print(x()) #+end_src <> does work, fails with this error: (error "Reference ‘assign_abc’ not found in this buffer") signal(error ("Reference ‘assign_abc’ not found in this buffer")) error("Reference `%s' not found in this buffer" "assign_abc") org-babel-ref-resolve("assign_abc()") ... I am not sure if this is a bug or I am doing something wrong, the documentation on this feature is not very comprehensive.