all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Jason Ross <jasonross1024@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Best way to include METAPOST in ConTeXt exporter
Date: Wed, 13 Oct 2021 14:51:49 +0800	[thread overview]
Message-ID: <87ily1s9h6.fsf@localhost> (raw)
In-Reply-To: <db14bc26-0fd1-8a8c-92a3-8a63e23d51e5@gmail.com>

Jason Ross <jasonross1024@gmail.com> writes:

> Here's a hook that modifies the source blocks to wrap their
> output in #+BEGIN/END_METAPOST tags if the ConTeXt backend is used,
> before Org Babel gets to them, but otherwise leaves them alone.
>
> I wonder if anyone has any better ideas of how to do this. I'm
> modifying the Org source with the hook before the document gets parsed
> so that it can be more backend-agnostic but it seems like it would
> be better if there was a way to modify the document parse tree
> directly instead. I don't like that I'm effectively parsing and
> rebuilding (hopefully) the same string in order to change the :result
> type.

I am not sure if there is an easy way. ob-exp gets run before backend
filters and you do not yet have access to the document parse tree.

You may consider a patch for ob-exp to get better control over code
execution during export.

Best,
Ihor


  reply	other threads:[~2021-10-13  6:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 17:53 Best way to include METAPOST in ConTeXt exporter Jason Ross
2021-10-04  8:41 ` Ihor Radchenko
2021-10-04 15:41   ` Jason Ross
2021-10-04 16:46     ` Ihor Radchenko
2021-10-05 14:40       ` Jason Ross
2021-10-05 19:50         ` Jason Ross
2021-10-13  6:51           ` Ihor Radchenko [this message]
2021-10-13  6:54         ` 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

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

  git send-email \
    --in-reply-to=87ily1s9h6.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jasonross1024@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.