From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KIVfJQhfMWCCfAAA0tVLHw (envelope-from ) for ; Sat, 20 Feb 2021 19:12:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qDMSIQhfMWB4RgAAbx9fmQ (envelope-from ) for ; Sat, 20 Feb 2021 19:12:08 +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 C726E2951D for ; Sat, 20 Feb 2021 20:12:07 +0100 (CET) Received: from localhost ([::1]:58660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDXfi-0006kc-VY for larch@yhetil.org; Sat, 20 Feb 2021 14:12:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDXes-0006kT-N4 for emacs-orgmode@gnu.org; Sat, 20 Feb 2021 14:11:14 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:42616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDXer-0002Mc-4f for emacs-orgmode@gnu.org; Sat, 20 Feb 2021 14:11:14 -0500 Received: by mail-ed1-x530.google.com with SMTP id z22so16543725edb.9 for ; Sat, 20 Feb 2021 11:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2RfDeiC7ljAN/PMIHa+cA6Ug6nZhPc6JUXmZkn30nQs=; b=JvmoQjoF7ncjGJCVfv29CDyGMPwvjV9TwMNlC7KvTybXP6lZh27aBv2W/dpO2AeAGN LJR9ksCUyVlOdlyGYBFOqp8BmTMQ9vasvmZBZxZfOqDvb5nf1x8spo+Dm6Hp2EowhvDd 1Dc182pRhSocRUbp4Z03MJbu21Ru3bOa61BkYBInbWU/K3qNAjkmZrKiOokvB9PchrB8 a60R5ad4rvLRzomzQSRUqmp4w0SpYq+hjm2KRxLgruOwm6BO9xQJnIKf1s7bDOTDveKM u2ZnBYoR3DB+BcO7PfWaU8ipVPDnEOb2eoJFhwBZ2iU+f2RjcTfeD24DRs+dIxUcXj1g fnyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2RfDeiC7ljAN/PMIHa+cA6Ug6nZhPc6JUXmZkn30nQs=; b=mLmDt86cMeiFxG+IT9HU1IxU+ssMSUzhgg5XksGkDCJsgo5+TMOqndxyc4VyxpF59r O3wnjiCIaIzSkNMm59vS7ETboQhByplFHQ1cSRZlSULiJhOqAWjbvwHM/qXmF4871/fI eHPmN46ZRvTrsL3ASU4QwuvJiVXuudffDaAK6q8TB021IarHhZweKS7LVBDkrkYAmjw/ g0Tp1b+NVLVo+Tp6KtWHutTb1GE3409564QlFoV3mo8cIr7/rgflIKvXCmRhrv1izgEZ QAMNUOriGlLM/ZHvHRtENJzPZ3j/1LOi2UsL15KooM41cbXD1kHugHryKIE6pVOSsHK+ MQsQ== X-Gm-Message-State: AOAM532sf84Wop7Mp88jj8bsWdn7UOLkreZWOF8RcxCWOXJ0rMHvsjJy E51/kHmL8jp/c5+G5dHCCl/ngPOmKqTi3uvxW8ylJrM= X-Google-Smtp-Source: ABdhPJw8u/1Olk+sCGeh4pvtQnKwevZgScPXrkAyaozt1Tsn7i0isis2N+SAtLOQFI6RORDvIIKg5cJCzykzagMOtvs= X-Received: by 2002:a05:6402:3133:: with SMTP id dd19mr14912469edb.337.1613848269502; Sat, 20 Feb 2021 11:11:09 -0800 (PST) MIME-Version: 1.0 From: Nathan Neff Date: Sat, 20 Feb 2021 13:10:58 -0600 Message-ID: Subject: Babel: Programmatically evaluate a heading and subtrees? To: emacs-orgmode Content-Type: multipart/alternative; boundary="000000000000d33d6f05bbc954ab" Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=nathan.neff@gmail.com; helo=mail-ed1-x530.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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=JvmoQjoF; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: C726E2951D X-Spam-Score: -0.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: sfZhmqoEu9dH --000000000000d33d6f05bbc954ab Content-Type: text/plain; charset="UTF-8" Hello all, I have some code like this: * Heading 1 # code block name:FOO ** Subheading 1 # code block ** Subheading 2 # code block I find that I often want to evaluate the code in Heading 1 and its subheadings. Currently, I navigate to Heading 1 and then use org-babel-execute-subtree I see that there's a function called org-babel-goto-named-src-block, so I think I could write a small function to jump to FOO in Heading 1 and then run execute subtree and then jump back to my previous location in Emacs. Is there a more programmatic or built-in way? For example: org-babel-execute-block-and-subheadings FOO Thanks, --Nate --000000000000d33d6f05bbc954ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello all,

I have some code like th= is:

* Heading 1

# code bl= ock name:FOO

** Subheading 1

<= div># code block

** Subheading 2

# code block

I find that I often want to e= valuate the code in Heading 1 and its subheadings.

Currently, I navigate to Heading 1 and then use org-babel-execute-subtree<= /div>

I see that there's a function called org-babel= -goto-named-src-block, so I think
I could write a small function = to jump to FOO in Heading 1 and then run execute subtree
and then= jump back to my previous location in Emacs.

Is th= ere a more programmatic or built-in way?=C2=A0 For example:
org-b= abel-execute-block-and-subheadings FOO

Thanks,
--Nate
--000000000000d33d6f05bbc954ab--