Org-mode mailing list
 help / color / mirror / Atom feed
From: Magnus Therning <>
To: Emacs Org Mode mailing list <>
Subject: Using a code block as input to another code block
Date: Sat, 21 Nov 2020 23:30:19 +0100
Message-ID: <> (raw)

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

I know I can use an example block (literal example) as input to a code
block, but I haven't found a way to fontify examples. Since my input is
code (JSON, and various programming languages) I would really like to
have that, as well as the language's mode when editing by using

A code block gives me fontification, but I haven't found a way to pass a
code block as is to another code block.

For instance, something like this:

#+name: code-input
#+begin_src C
#include <foo.h>

#+begin_src bash :var input=input :results verbatim
cat <<EOF | cpp

What are my options? I hope there's either a way to fontify an example,
or to override the default execute function for a code block, or
something else that I'm not thinking of.


Magnus Therning              OpenPGP: 0x927912051716CE39
twitter: magthe    

I am always doing that which I cannot do, in order that I may learn
how to do it.
     — Pablo Picasso

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

             reply	other threads:[~2020-11-21 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-21 22:30 Magnus Therning [this message]
2020-11-22 17:26 ` Berry, Charles via General discussions about Org-mode.
2020-11-23 11:39   ` Magnus Therning
2020-11-22 21:50 ` Mike Gauland

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:

  List information:

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

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ \
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone