emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Org src blocks and multiline macros
Date: Thu, 02 Aug 2018 09:33:33 +0300	[thread overview]
Message-ID: <87effhb7lu.fsf@iki.fi> (raw)


Greetings.

I am once again facing a situation where I would like to define a
multiline org macro. If my memory is not failing me (it might well be),
this is not possible.

So this lead me to consider the use of Org source blocks in Babel. Which
might well be a discussion I have had here before, see the reference to
the state of my memory above.

1. Is it now possible to pass variables to these blocks?

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}}}.

  This property would really help me structure some org documents in a
  sensible way when common parts can be reused.
#+END_SRC

Jarmo

             reply	other threads:[~2018-08-02  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02  6:33 Jarmo Hurri [this message]
2018-08-02 11:24 ` Org src blocks and multiline macros Kaushal Modi
2018-08-02 12:32   ` Jarmo Hurri
2018-08-02 16:50     ` Berry, Charles
2018-08-03  6:16       ` Jarmo Hurri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87effhb7lu.fsf@iki.fi \
    --to=jarmo.hurri@iki.fi \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).