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 2AgEDEXIwV+YFwAA0tVLHw (envelope-from ) for ; Sat, 28 Nov 2020 03:47:17 +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 YJfJB0XIwV+PKgAA1q6Kng (envelope-from ) for ; Sat, 28 Nov 2020 03:47:17 +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 05285940253 for ; Sat, 28 Nov 2020 03:47:16 +0000 (UTC) Received: from localhost ([::1]:41602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kirCc-0004V0-6x for larch@yhetil.org; Fri, 27 Nov 2020 22:47:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kirBu-0004Uq-08 for emacs-orgmode@gnu.org; Fri, 27 Nov 2020 22:46:30 -0500 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:40936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kirBs-00009g-67 for emacs-orgmode@gnu.org; Fri, 27 Nov 2020 22:46:29 -0500 Received: by mail-oi1-x231.google.com with SMTP id a130so7974738oif.7 for ; Fri, 27 Nov 2020 19:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=CVCGNwK0c1IwYGDUG2suj612Q83bjDyzfHMeYPe0u6A=; b=ejq6qCU9LplLU2Ucjc+BaLM6PQ1nDFzioQqs7frPjZ8lemLbr4qPOx783FCHlkcmVi G3bwlctrqOGO+9ADs5qrje7mTdPZMp/r2BOK4nZclt9zlQSpI8v0vNFKN0zkKUSCLCwo faAXlsTjsp6WcjfulbtehD63Wne+oBTrigJ1BwBbkn4UCrY9WvFTgreOGNV0jAbVBtpx OlcYtNXlbyh/fjStjiuFxVbZrn7rNKnBlZMuNMfEL4vMCx8vfwrj8lfc2iQBofeb7pyw vLPYxrsZv3hC9D5jAO7nCHXU31NUNeFWb7FREvY1XYltuO2iEhOMVFIRwj/oAhbHgIue ZzWQ== 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:reply-to :from:date:message-id:subject:to:cc; bh=CVCGNwK0c1IwYGDUG2suj612Q83bjDyzfHMeYPe0u6A=; b=JFKi2ifTIkOCaJ7F+/u8HLlb3MtBojoLnwxRs4OZKJZ8iK5VpCxjYuGihCtV9It1Cs PE522vLjvgLgjQKk3hNINGjiHTzMIzFSm1CROeevSixjDWgwS836bJTr2kcSRnHReXVa LFiOpz9JSCI9UKwmhuGfOUtTfnRMWPnKQWscUfiyWdGtP8WNaa1VVzD/TD1YLIBbXKLh iBjslj/tpulRAluEI6V69Nv1SUD0RESiFCNA0bsvbvg/DlafK0gwFFt2Pvmkf+ljpxOT ZuVRUVbo+rQV9FBRZ2hSssHcqQxMoSanTQD7qr+00PmGnOZTqpLpX0313OhknOQD9kua m6WQ== X-Gm-Message-State: AOAM5335ghsX5hNelvzWon855NJeUtsZo8NfL5Ar3JoWkt2XNHlKiip9 AVfKx/P1T9P4nVVvnEJZQ7zFFm2G3KTQoOur6zRhcRXxHVw= X-Google-Smtp-Source: ABdhPJzceGzFfx1lqEgsLhQhPhPImGy61eI/sz8Ch4STQ/c/lwnnEIpMEouUxFd3qzn92uHOuGKLt0bikiJ38BHrrlk= X-Received: by 2002:a05:6808:b38:: with SMTP id t24mr7923182oij.153.1606535183738; Fri, 27 Nov 2020 19:46:23 -0800 (PST) MIME-Version: 1.0 References: <87y2imqkxt.fsf@kyleam.com> In-Reply-To: <87y2imqkxt.fsf@kyleam.com> From: George Mauer Date: Fri, 27 Nov 2020 21:46:13 -0600 Message-ID: Subject: =?UTF-8?Q?Re=3A_How_to_get_a_block=E2=80=99s_contents_by_name?= To: Kyle Meyer Content-Type: multipart/alternative; boundary="000000000000f22e3d05b5229e15" Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=gmauer@gmail.com; helo=mail-oi1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Reply-To: gmauer@gmail.com Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; none X-TUID: uUqq4EGplAwT --000000000000f22e3d05b5229e15 Content-Type: text/plain; charset="UTF-8" Well that pains me on a software-engineer-aip-design level but that works! Thanks a lot. On Fri, Nov 27, 2020 at 8:22 PM Kyle Meyer wrote: > George Mauer writes: > > > I'm trying to figure out how I could fetch the contents of another block > by > > name from an elisp script > > > > I've seen `org-sbe` but I just want to get the block contents, (ideally > > with noweb and vars filled in - just as it would be tangled if we were to > > tangle it) > > > > How do I do that? > > How about something like this? > > (save-excursion > (goto-char (org-babel-find-named-block "b")) > (org-babel-expand-src-block)) > --000000000000f22e3d05b5229e15 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Well that pains me on a software-engineer-aip-design level= but that works! Thanks a lot.

On Fri, Nov 27, 2020 at 8:22 PM Kyle Meyer &l= t;kyle@kyleam.com> wrote:
George Mauer writes:

> I'm trying to figure out how I could fetch the contents of another= block by
> name from an elisp script
>
> I've seen `org-sbe` but I just want to get the block contents, (id= eally
> with noweb and vars filled in - just as it would be tangled if we were= to
> tangle it)
>
> How do I do that?

How about something like this?

=C2=A0 (save-excursion
=C2=A0 =C2=A0 (goto-char (org-babel-find-named-block "b"))
=C2=A0 =C2=A0 (org-babel-expand-src-block))
--000000000000f22e3d05b5229e15--