From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [BUG] Noweb reference eval syntax does not work Date: Thu, 12 May 2016 19:35:15 -0400 Message-ID: <87mvnu97f0.fsf@gmail.com> References: <87h9ec2ngz.fsf@fm4d.net> <87shxsaojc.fsf@saiph.selenimh> <87futs3dxi.fsf@gmx.us> 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]:37745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b10fe-00048p-FF for emacs-orgmode@gnu.org; Thu, 12 May 2016 20:09:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b10fb-0001Yw-66 for emacs-orgmode@gnu.org; Thu, 12 May 2016 20:09:34 -0400 Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:34506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b10fb-0001Ys-1f for emacs-orgmode@gnu.org; Thu, 12 May 2016 20:09:31 -0400 Received: by mail-qk0-x22a.google.com with SMTP id r184so52715788qkc.1 for ; Thu, 12 May 2016 17:09:30 -0700 (PDT) In-Reply-To: <87futs3dxi.fsf@gmx.us> 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 Hi Rasmus, hi all, 2016ko maiatzak 8an, Rasmus-ek idatzi zuen: [...] > As you mention, we=E2=80=99d loose the ability to chain together multiple= blocks. > I reckon they are meaningfully the same language, so I don=E2=80=99t see = a loss. > The example shown in the manual also does not convince me of the > usefullness of this. Ditto. >=20 >> It is redundant with #+NAME: keyword and slightly broken. Also it >> induces hacks like `org-babel-use-quick-and-dirty-noweb-expansion' to >> work-around its shortcomings.=20 >>=20 >> Besides, it doesn't make much sense to add the same parameters to >> a bunch of blocks, so I find the syntax dubious. >>=20 >> I understand it can be a handy shortcut for inserting multiple blocks, >> but, all in all, I tend to think it would be simpler to just remove the >> feature, along with `:noweb-sep' and >> `org-babel-use-quick-and-dirty-noweb-expansion'. >=20 > I=E2=80=99m happy to kill it off in Org-9. I don=E2=80=99t know how wide= ly the chaining > of blocks is used, though, and whether the fix is always as simple as > uniting the blocks. 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. (And I think it would be good if the LoB contained some useful predefined blocks like this one, in addition to those added by the user. A =E2=80=9Cstandard library of babel=E2=80=9D as it were.) >=20 >> What do you, and others, think? Is NAME enough for noweb syntax, or is >> there a real need fo :noweb-ref? 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. --=20 Aaron Ecay