From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Bug: duplicated output in inline code block exports Date: Thu, 5 Jul 2018 19:14:31 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb9iD-0008Sq-26 for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 15:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb9i9-0007du-TK for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 15:14:41 -0400 Received: from iport-bcv4-out.ucsd.edu ([132.239.0.122]:58520) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb9i9-0007cP-CC for emacs-orgmode@gnu.org; Thu, 05 Jul 2018 15:14:37 -0400 In-Reply-To: Content-Language: en-US Content-ID: 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: William Denton Cc: emacs-org > On Jul 5, 2018, at 10:46 AM, William Denton wrote: >=20 > Here's a very simple R command in an inline code block: >=20 > # ----- > What is 1 + 1? src_R{1+1} {{{results(=3D2=3D)}}} > # ----- >=20 > Exporting this to PDF we get: >=20 > # ----- > What is 1 + 1? 2 2 Or exporting to to latex=20 What is 1 + 1? \texttt{2} \texttt{2} The results macro gets initialized by `org-macro-initialize-templates' whic= h is run run before babel, the macro returns `=3D2=3D', and babel does not = remove this when it adds the result again. A work-around is to put this null macro: # ---- #+macro: results # ---- in your buffer to strip out the existing inline results. I do not get why this wasn't detected before - the pre-babel call to {{{res= ults( )}}} has been in the code since last year. Also, shouldn't the docstring for `org-macro-initialize-templates' mention= that "n", "author", "email", "keyword", "results", and "title" get set? Chuck