From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Multi-line macros (again) Date: Sun, 09 Oct 2016 11:25:00 +0200 Message-ID: <87y41xkh77.fsf@nicolasgoaziou.fr> References: <87int49z1k.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btALz-0001il-4t for emacs-orgmode@gnu.org; Sun, 09 Oct 2016 05:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btALt-000746-4v for emacs-orgmode@gnu.org; Sun, 09 Oct 2016 05:25:06 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btALs-00073M-Uq for emacs-orgmode@gnu.org; Sun, 09 Oct 2016 05:25:01 -0400 In-Reply-To: <87int49z1k.fsf@iki.fi> (Jarmo Hurri's message of "Fri, 07 Oct 2016 14:30:31 +0300") 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 Hello, Jarmo Hurri writes: > One of the most useful properties of LaTeX is \newcommand, which allows > you to reuse document structures. I really, _really_ miss this feature > in Org. Org has #+MACRO, but it is limited to a single line. That is > very inconvenient for any larger structures. Of course, macro are inconvenient for complex structures. They are not the right tool for the job. You could use Babel for that, e.g., #+name: template #+header: :var x="" y="" #+header: :results silent #+begin_src org $x $y #+end_src #+call: template("line 1", "line 2") :results replace #+RESULTS: line 1 line 2 > Could we have multiline macros, something like > > #+BEGIN_MACRO name > #+END_MACRO For the record, I think that block syntax is largely overloaded. I'd rather not introduce a new type of block without a really good reason. Anyway, is there anything wrong with Babel, as suggested above? Regards, -- Nicolas Goaziou