From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EJKpDqC8D2Jn/QAAgWs5BA (envelope-from ) for ; Fri, 18 Feb 2022 16:34:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GGkODKC8D2IHKQAA9RJhRA (envelope-from ) for ; Fri, 18 Feb 2022 16:34:56 +0100 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 385AB26C7F for ; Fri, 18 Feb 2022 16:34:55 +0100 (CET) Received: from localhost ([::1]:51200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nL5Ha-000852-3J for larch@yhetil.org; Fri, 18 Feb 2022 10:34:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nL5Gx-00084B-Vb for emacs-orgmode@gnu.org; Fri, 18 Feb 2022 10:34:17 -0500 Received: from [2a00:1450:4864:20::535] (port=38601 helo=mail-ed1-x535.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nL5Gu-0005GE-BJ for emacs-orgmode@gnu.org; Fri, 18 Feb 2022 10:34:15 -0500 Received: by mail-ed1-x535.google.com with SMTP id s24so9725859edr.5 for ; Fri, 18 Feb 2022 07:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=VOJx061uA8pnNOIKvjShEPl6nptEH53rKx/0Hf3TJdg=; b=Ci8H7w4DhJTB+Z9vAYPyJO93Tik3O80xncnfxoxIoGCQImDenDn6qJRByDT/z5geH2 MKMzLhCTLYrUUkQd19R5OjmO/KdwVm5ftabPNAUg34iHIIhxAtxDGjNNQc71zPPpaY3I 70lCjanvcCktvy68Qs6X8mJTqFEjwIJ71d+c/ZaARAQrvOt9cOFyq2kN+ZbQlXQ4NvDm FQmkJ7FKpTz5G+NsQsN4p5OFfS1qKUvXG52rAuKi52P0W3q8hCpiAqSMR/Yb9HUxL35S y+N38p17ahumK1k+RTXMKRQkfiQcAO13411CqfWeYpEmtysXNtguasjTi1TOAcVgl+NB PGDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=VOJx061uA8pnNOIKvjShEPl6nptEH53rKx/0Hf3TJdg=; b=IreRFRLMU+oCD/NtTDMG1fMIM6gCiCG1U2bL0dGrqkx9PUYy0Wsh+06Zj7qYI4u8Q1 CiNBg8rP7CD942xLj/NS9K2RFEdaRKm52phTZU74lzYgCqOGungztOE6lZf6Hrfb+UPb tOqAwfzyyGzr54dU6mZ33SOqqznLxii4hvIATqQ423D1U5zKOcliUzWba6M2GnU2GXCg SZfTbmMDtFrhb1fviqv3FZEkHhVL625jIqWhVzZvpyMhXsyuzCW0eTpTbDnhqJM/49df h/B+yA77eSaEUo4P5E8fHy5qxOqtze33ZINl1AJ0z5uNqKduqv7XhBldBVwmxZuSVU3r sIIA== X-Gm-Message-State: AOAM531xwgVzHbQr0qcOUjMAQzBKA3gp9WmADfO61UIgjg+7Tj0rSYR8 xSiJAy5P3WHVu+Ae9DkAFMhI8Pmy42/dYqXoOFbvVg9NOyU= X-Google-Smtp-Source: ABdhPJxDa+u6tvUuRV2VjaKUOHNjf9eD803Ymp3z4X8F+CgoYYEjqCJc4VFB9j6nYfJeUlnSytBt6DFcP/xNsRw3820= X-Received: by 2002:a50:d80a:0:b0:410:f1be:208b with SMTP id o10-20020a50d80a000000b00410f1be208bmr8953408edj.386.1645198448869; Fri, 18 Feb 2022 07:34:08 -0800 (PST) MIME-Version: 1.0 References: <87wnhss7z4.fsf@ucl.ac.uk> In-Reply-To: <87wnhss7z4.fsf@ucl.ac.uk> From: John Kitchin Date: Fri, 18 Feb 2022 10:33:58 -0500 Message-ID: Subject: Re: processing of babel blocks and select_tags To: Org Mode List Content-Type: multipart/alternative; boundary="0000000000002143c605d84c9d0b" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::535 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=johnrkitchin@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645198495; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VOJx061uA8pnNOIKvjShEPl6nptEH53rKx/0Hf3TJdg=; b=mhYdIwwpva66W4S9eI54XkZGxot8WUBs0goe4geqYFLq849NoDd0eW+lVWg3q16ZtpQvE/ DLDVb42AIGdY2UhEJDVKWbGRbVu9tTF2SFBoF/OHT0IsEUeNNifXqUznBTiISMCQakCCs+ zGucRFgawED67Y+XlnLQGo9YQ2tEkNFeAk5rqrTdhdN2mghBAZqgQidlo9Lu48v+qbvOcJ 8zQO4Pm0JuqQeWZen803Gpqul+4rOMKinIyq/4m1zLhTDlbac6kvyux4oHUnJGWqlYWPw3 eqTQpuX2sxwSVlYWEtJ3PflSuOj69X+CmOIBeJty7dytS60nRiWc81PAAZaJ7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645198495; a=rsa-sha256; cv=none; b=gNpGO+i4xUZC+o7Avu61EdEFVP4tvbluaxAjBdgc335cXr5EI7gf1Jo2klLNuHplPukMbK U2QwS1kVvZAR/lvzhDlXht82FDPKNJwHHrPkp0ABrYZ0J1BR9bFMMnMYOVyr3C7mk1KPRW iVf5zo9QCcT/So+Lx8z3oLmsn+w1Ww1MDzbiwvSrJyIXJpFrzTQXXKqLpgNWavx4RL67YN DcZUsIoLiMpRsjFQH7UBDOtuN7Lcmjzf1+V3m6eRgIwYC3Pm3lELRk36r2BgqdTG/U5rEg B+053787kr3GtphuLA+rs5o1gjfuxCwkxTp1W18U1rEvQ0AcrNyhMPWR30TIUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=Ci8H7w4D; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=Ci8H7w4D; dmarc=pass (policy=none) header.from=andrew.cmu.edu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 385AB26C7F X-Spam-Score: -7.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: MLcQROU/N67k --0000000000002143c605d84c9d0b Content-Type: text/plain; charset="UTF-8" I guess that is just expanding the src blocks, not actually running them. I couldn't find where that happens though, it is early in the export process I think. Maybe you can just use a preprocessing hook to export to org, which should only include the selected sections, then export that to what you want. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Fri, Feb 18, 2022 at 7:07 AM Eric S Fraga wrote: > Hello all, > > TL;DR: can I have org completely ignore src blocks in non-selected > sections during export without using COMMENT? > > Longer version: I am in the process of writing a book. I prefer to have > all the content in one file and use SELECT_TAGS to limit the export (for > formatting) to the current section I am working on. > > I have noticed that all org babel src blocks are processed in some way > even if (a) they are not in a selected section and (b) have, for > instance, ":eval no-export" set. For some of these blocks, the > processing time appears to be quite significant, e.g. if they have a > ":var x=somebigtable", but I could be wrong about this, of course. > > I do not understand why these src blocks are processed at all. Is there > some way to stop them being processed? I know I could "comment" out all > other sections but that's a lot more work and messy than simply tagging > the current section to be selected. > > Attached is a minimal example. When I export, I see these messages: > > org-babel-exp process julia at position 162... > org-babel-exp process julia at position 384... > > Thank you, > eric > > -- > : Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50 > --0000000000002143c605d84c9d0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I guess that is just expanding the src blocks, not actuall= y running them. I couldn't find where that happens though, it is early = in the export process I think.

Maybe you can just use a = preprocessing hook to export to org, which should only include the selected= sections, then export that to what you want.

John

-------------------= ----------------
Professor John Kitchin (he/him/his)
Doherty Hall A20= 7F
Department of Chemical Engineering
Carnegie Mellon University
P= ittsburgh, PA 15213
412-268-7803
@johnkitchin
<= a href=3D"http://kitchingroup.cheme.cmu.edu" target=3D"_blank">http://kitch= ingroup.cheme.cmu.edu



On Fri, Feb 18, 2022 at 7:07 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
Hello all,

TL;DR: can I have org completely ignore src blocks in non-selected
sections during export without using COMMENT?

Longer version: I am in the process of writing a book.=C2=A0 I prefer to ha= ve
all the content in one file and use SELECT_TAGS to limit the export (for formatting) to the current section I am working on.

I have noticed that all org babel src blocks are processed in some way
even if (a) they are not in a selected section and (b) have, for
instance, ":eval no-export" set.=C2=A0 For some of these blocks, = the
processing time appears to be quite significant, e.g. if they have a
":var x=3Dsomebigtable", but I could be wrong about this, of cour= se.

I do not understand why these src blocks are processed at all.=C2=A0 Is the= re
some way to stop them being processed?=C2=A0 I know I could "comment&q= uot; out all
other sections but that's a lot more work and messy than simply tagging=
the current section to be selected.

Attached is a minimal example.=C2=A0 When I export, I see these messages:
org-babel-exp process julia at position 162...
org-babel-exp process julia at position 384...

Thank you,
eric

--
: Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50
--0000000000002143c605d84c9d0b--