From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] Noweb reference eval syntax does not work Date: Mon, 16 May 2016 00:40:11 +0200 Message-ID: <87eg93uer8.fsf@saiph.selenimh> References: <87h9ec2ngz.fsf@fm4d.net> <87shxsaojc.fsf@saiph.selenimh> <87futs3dxi.fsf@gmx.us> <87mvnu97f0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b24hx-0003fZ-2g for emacs-orgmode@gnu.org; Sun, 15 May 2016 18:40:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b24hu-0008RR-Uz for emacs-orgmode@gnu.org; Sun, 15 May 2016 18:40:19 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:42898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b24hu-0008RF-P4 for emacs-orgmode@gnu.org; Sun, 15 May 2016 18:40:18 -0400 In-Reply-To: <87mvnu97f0.fsf@gmail.com> (Aaron Ecay's message of "Thu, 12 May 2016 19:35:15 -0400") 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: Rasmus Cc: orgmode Hello, Aaron Ecay writes: > I think that we can provide a replacement to noweb-ref as follows: > > * Code blocks > :PROPERTIES: > :header-args: :noweb-ref foo > :END: > > #+begin_src python > block 1 > #+end_src > #+begin_src python > block 2 > #+end_src > > * Concat > > The old way > > #+begin_src python > <> > #+end_src > > The new way: > > #+begin_src python > <> > #+end_src > > concat-blocks-of-lang-in-headline would have to be an elisp source block > implementing the appropriate behavior which is present in the document > or in the library of babel. [...] > To put it another way: it seems to me that the functionality of > :noweb-ref can be reimplemented in terms of other primitives. And given > Nicolas=E2=80=99s comments about the complications and bugs it introduces= , I=E2=80=99d > be in favor of deprecating and eventually removing it. I like the idea of separating block chaining and basic block syntax. That way, you don't need to pay the full price of the former if you only use the latter. However, filtering per language and headline header may be a burden. For example, this ignores blocks before first heading, and forces user to store them under the same headline. We could also keep :noweb-ref references and chain all blocks with a given :noweb-ref, with a special command. What about <> ? Eventually we could add into the manual how a chained block can be evaluated, since <> is not meaningful. WDYT? Regards, --=20 Nicolas Goaziou