emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: processing of babel blocks and select_tags
Date: Fri, 18 Feb 2022 10:33:58 -0500	[thread overview]
Message-ID: <CAJ51EToMeFgOWgunN=DdVpqoXYSiSCuLiyWofPhbPL_==6ZYnw@mail.gmail.com> (raw)
In-Reply-To: <87wnhss7z4.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]

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 <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.  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
>

[-- Attachment #2: Type: text/html, Size: 2581 bytes --]

  reply	other threads:[~2022-02-18 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 11:57 processing of babel blocks and select_tags Eric S Fraga
2022-02-18 15:33 ` John Kitchin [this message]
2022-02-18 15:45   ` Eric S Fraga
2022-02-19  7:54 ` Jeremie Juste
2022-02-19 16:47   ` Eric S Fraga
2022-10-23  5:35     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ51EToMeFgOWgunN=DdVpqoXYSiSCuLiyWofPhbPL_==6ZYnw@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).