From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Org src blocks and multiline macros Date: Thu, 2 Aug 2018 07:24:21 -0400 Message-ID: References: <87effhb7lu.fsf@iki.fi> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000020b49b0572720e55" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flBid-00047p-89 for emacs-orgmode@gnu.org; Thu, 02 Aug 2018 07:24:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1flBic-00023P-87 for emacs-orgmode@gnu.org; Thu, 02 Aug 2018 07:24:35 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:44028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1flBib-00021S-TB for emacs-orgmode@gnu.org; Thu, 02 Aug 2018 07:24:34 -0400 Received: by mail-lj1-x231.google.com with SMTP id r13-v6so1580453ljg.10 for ; Thu, 02 Aug 2018 04:24:33 -0700 (PDT) In-Reply-To: <87effhb7lu.fsf@iki.fi> 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: Jarmo Hurri Cc: emacs-orgmode@gnu.org --00000000000020b49b0572720e55 Content-Type: text/plain; charset="UTF-8" Hello, On Thu, Aug 2, 2018, 2:34 AM Jarmo Hurri wrote: > > Greetings. > > I am once again facing a situation where I would like to define a > multiline org macro. I'm not sure what that means, but based on your example a different solution might work for you. 2. If not, could we have this feature? This would give us immediate > multiline macros in the following style, where referring to the value > of the variable could be done macro-style. > > #+HEADER: :var val1=foo > #+BEGIN_SRC org :var val2=" bar" > Currently this gives me nothing but {{{val1}}}{{{val2}}}. > ... > Org macros don't get evaluated inside src blocks as far as I know. But Noweb might help you. Look for this feature in Org manual. I use Noweb as "macros for src blocks". > -- Kaushal Modi --00000000000020b49b0572720e55 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
On Thu, Aug 2, 2018, 2:34 AM Jarmo Hurri <jarmo.hurri@iki.fi> wrote:

Greetings.

I am once again facing a situation where I would like to define a multiline= =C2=A0org macro.

I'm not sure wh= at that means, but based on your example a different solution might work fo= r you.=C2=A0

2. If not, could we have this feature? This would give us i= mmediate
=C2=A0 =C2=A0multiline macros in the following style, where referring to th= e value
=C2=A0 =C2=A0of the variable could be done macro-style.

#+HEADER: :var val1=3Dfoo
#+BEGIN_SRC org :var val2=3D" bar"
=C2=A0 Currently this gives me nothing but {{{val1}}}{{{val2}}}.
...

Org macros don't get eval= uated inside src blocks as far as I know. But Noweb might help you. Look fo= r this feature in Org manual. I use Noweb as "macros for src blocks&qu= ot;.
--

Kaushal Modi

--00000000000020b49b0572720e55--