From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] inline src block results can be removed Date: Wed, 12 Nov 2014 19:34:37 +0000 Message-ID: <87egt81acy.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xodh1-0004ho-NW for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 14:35:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xodgs-0002GV-KN for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 14:35:03 -0500 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:36656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xodgs-0002GL-DQ for emacs-orgmode@gnu.org; Wed, 12 Nov 2014 14:34:54 -0500 Received: by mail-wi0-f182.google.com with SMTP id d1so5983211wiv.9 for ; Wed, 12 Nov 2014 11:34:53 -0800 (PST) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Charles C. Berry" , emacs-orgmode@gnu.org Cc: mcg , Andreas Leha , Ista Zahn , Nicolas Goaziou Hi Chuck, 2014ko azaroak 12an, "Charles C. Berry"-ek idatzi zuen: >=20 > Inline src blocks cannot update their results --- causing some of us=20 > heaadaches [1]. >=20 > These patches fix that by placing the result of an inline src block in an= =20 > export snippet with a faux :back-end called 'babel'. >=20 > So C-c C-c with point on src_R{1+2} will insert `@@babel:3@@'. Updating=20 > the contents of the inline src block and retyping C-c C-c will update the= =20 > snippet. On export, these snippets are rendered using the verbatim=20 > transcoder, e.g. \texttt{3} for latex backends. >=20 > Support for most backends is provided. >=20 > org-babel-execute-buffer will also update such snippets. Instead of using an export snippet, which requires per-backend changes, you could wrap results in a macro, e.g. {{{results(2)}}}. Users could customize this macro per-buffer (with the usual #+macro keyword) to provide their own formatting of inline results. You could provide the fallback interpretation in the second call to =E2=80=98org-macro-replace-all=E2=80=99 in =E2=80=98org-export-as=E2=80=99 = (currently responsible for expanding a few macros like {{{author}}} and {{{date}}}). What do you think of this idea? --=20 Aaron Ecay