From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kMMGLbvXql9SNAAA0tVLHw (envelope-from ) for ; Tue, 10 Nov 2020 18:11:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uFriKLvXql+mfQAA1q6Kng (envelope-from ) for ; Tue, 10 Nov 2020 18:11:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0A0479403A8 for ; Tue, 10 Nov 2020 18:11:06 +0000 (UTC) Received: from localhost ([::1]:47860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcY6i-0000wx-I2 for larch@yhetil.org; Tue, 10 Nov 2020 13:11:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcY6A-0000uy-A6 for emacs-orgmode@gnu.org; Tue, 10 Nov 2020 13:10:30 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:34461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcY68-0004Ah-H3 for emacs-orgmode@gnu.org; Tue, 10 Nov 2020 13:10:30 -0500 Received: by mail-ej1-x630.google.com with SMTP id o9so18989043ejg.1 for ; Tue, 10 Nov 2020 10:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzamboni-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NqqZXzTASsrXXa+eeXAIyqkhuR+bCnkVA0X7ud4LRA0=; b=ZQ7CfB1AzDV82leN+Zho0taSK1Ow47DkWiTJxpuQoxDA0VWdl9RqFMUcvGHOrrCPUt flFy//BNwlbkilPN1guHZCFK2kYrEbdWlAHa5hd2G4OZw2Foqwrv2mwcy0RDrLLpRHyr pwNJIUq+lZQHkWGlhY4vcf9vVomR2vwUHayuRPr2hTeR8oVbSf0JvIFQ1GJtPY5nSAdf Q+B5HjuREGDxKd+YWXiD0krE34Cgj5ek7VxKajTtsi6uzSccg4ha0ppEt36C/CPZIadH huSos9vwT8WabDXKrkyyEno8O7oe5Cc38oMRDSZjmzqoLG6h3CMo4b8c8DPsYsBfSPNa tzvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NqqZXzTASsrXXa+eeXAIyqkhuR+bCnkVA0X7ud4LRA0=; b=o5dHoILpU4I7aKKL8nvxUQ9J04hh551+4RfovUJuHVXw+/gsguuMhzPWj005o/KHuQ 4/Vao15ES5QbCa4CjLwANRmGws4ZporJ8LAHluqL8n/LSU/+7XBfCXG2IpeS/Yc/jKEN K+tLNUEQ9nznd4/qC8ZdhzbU3AmQMebfy+SDQp9Sy7QRbO02lc+806DMVQ+ABcTJ7rzD tWaFefVoCJun6zUNcrDRlrgmar1Q7/LO0blRP+eRVlVAURuGc6fmB2f4bfuvIjai6YOt bFzeixI7uH2oVmiwMefWOFh2JOqMpDlW77KqXk0JaReRcBOw8J7vkyhaM7EKQRBLbTRp XFLA== X-Gm-Message-State: AOAM531yc4IKr7II4wOWGUyU43sB1fD+RA1plhRwqB3qw8WGv4issXf6 kxqj3FameqitPLf8YZ+WVdPHwHrRSFQwK+8BgtrisQ== X-Google-Smtp-Source: ABdhPJz0WnPJbufiK119gDxklj/MNaRPYH1j2bY1wR+asL5FmtREkItowy+2luQVNU4aDvAdRAaywy0048NBroR3I7U= X-Received: by 2002:a17:906:48a:: with SMTP id f10mr20888155eja.5.1605031824261; Tue, 10 Nov 2020 10:10:24 -0800 (PST) MIME-Version: 1.0 References: <43B88A5C-E21D-42B5-9AC7-F33908FB4EEC@health.ucsd.edu> In-Reply-To: <43B88A5C-E21D-42B5-9AC7-F33908FB4EEC@health.ucsd.edu> From: Diego Zamboni Date: Tue, 10 Nov 2020 19:10:13 +0100 Message-ID: Subject: Re: How to wrap Org code generated by a source block? To: "Berry, Charles" Content-Type: multipart/alternative; boundary="000000000000bd1d3505b3c4972a" Received-SPF: none client-ip=2a00:1450:4864:20::630; envelope-from=diego@zzamboni.org; helo=mail-ej1-x630.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zzamboni-org.20150623.gappssmtp.com header.s=20150623 header.b=ZQ7CfB1A; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: yUdotKMb21mg --000000000000bd1d3505b3c4972a Content-Type: text/plain; charset="UTF-8" Hi Chuck, Thanks! =:results drawer= is exactly what I was looking for :) I tried also with =:wrap src org=, but then upon export it's exported literally as Org src code, instead of interpreted as such. The drawer was exactly what I needed, and allows reevaluation of the block, replacing all the results correctly. Cheers, --Diego On Tue, Nov 10, 2020 at 6:41 PM Berry, Charles wrote: > > > > On Nov 10, 2020, at 6:13 AM, Diego Zamboni wrote: > > > > I want to generate some parts of my document programmatically from an > emacs-lisp src block - i.e. the code produces Org markup which I want to > then export. Is there a way to wrap the #+RESULTS block in an environment > that still gets evaluated as Org text (e.g. when exporting)? > > > > > > > Try `:results drawer' > > You can also do fancy stuff using `:wrap "src ..."' where `...' is a > language and additional header args. One language choice is `org', but I > don't think this approach is what you need. > > HTH, > Chuck > --000000000000bd1d3505b3c4972a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Chuck,

Thanks! =3D:results drawer=3D= is exactly what I was looking for :)

I tried also= with =3D:wrap src org=3D, but then upon export it's exported literally= as Org src code, instead of interpreted as such. The drawer was exactly wh= at I needed, and allows reevaluation of the block, replacing all the result= s correctly.

Cheers,
--Diego
<= br>

On Tue, Nov 10, 2020 at 6:41 PM Berry, Charles <ccberry@health.ucsd.edu> wrote:


> On Nov 10, 2020, at 6:13 AM, Diego Zamboni <diego@zzamboni.org> wrote:
>
> I want to generate some parts of my document programmatically from an = emacs-lisp src block - i.e. the code produces Org markup which I want to th= en export. Is there a way to wrap the #+RESULTS block in an environment tha= t still gets evaluated as Org text (e.g. when exporting)?
>
>


Try `:results drawer'

You can also do fancy stuff using `:wrap "src ..."' where `..= .' is a language and additional header args. One language choice is `or= g', but I don't think this approach is what you need.

HTH,
Chuck
--000000000000bd1d3505b3c4972a--