From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: breakage: Using self-defined Macro in macro definition Date: Mon, 20 Jan 2020 11:27:04 +0100 Message-ID: <20200120112704.2cb35eac@pckr200.mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36029) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itUH3-0005vl-2s for emacs-orgmode@gnu.org; Mon, 20 Jan 2020 05:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itUH2-0005zY-1B for emacs-orgmode@gnu.org; Mon, 20 Jan 2020 05:27:12 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:33935) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itUH1-0005yW-O2 for emacs-orgmode@gnu.org; Mon, 20 Jan 2020 05:27:11 -0500 Received: from pckr200.mpip-mainz.mpg.de ([194.95.63.248]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MDhpZ-1iju9K0WVb-00AnRb for ; Mon, 20 Jan 2020 11:27:09 +0100 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi, when I use a self-defined macro in a macro definition, subsequent macros in the same macro definition don't get expanded (tested with org version 9.2.1 and tip of maint): --- snip example --- #+Macro: newline (eval "\n") #+Macro: new $1 {{{newline}}}#+Index: $1 {{{newline}}} Use the {{{new(format)}}} command to format a string according to the /format-string/ argument. --- snip example --- the output of which is: --- snip resulting output --- Use the format a \index{format {{{newline}}}} command to format a string according to the \emph{format-string} argument. --- snip resulting output --- The expected output would be: --- snip expected output --- Use the format a \index{format} command to format a string according to the \emph{format-string} argument. --- snip expected output --- PS: leaving the second {{{newline}}} out is not a solution, as paragraph reformatting will put the macro in the middle of the line. The issue doesn't crop up, when using a predefined macro, e.g. ` date' or `author'. It also doesn't show up, when the first macro in the macro is e.g. the predefined macro `date'. That is the following example 2 works ok: --- snip example 2 --- #+Date: <2020-01-20 Mon> #+Macro: old $1 {{{date}}} {{{newline}}} alpha {{{newline}}} beta {{{old}}} --- snip example 2 --- Thanks for any hints/help. Best regards Robert