From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Satoru KURASHIKI <lurdan@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel results in other lang code
Date: Sat, 1 Aug 2015 12:20:23 -0700 [thread overview]
Message-ID: <alpine.OSX.2.11.1508011201560.562@charles-berrys-macbook.local> (raw)
In-Reply-To: <CAM0xXk_hQ8+k8YFf3tNfa0sRwtnp5LLhuNhUFFgybJBSqvt-ng@mail.gmail.com>
On Sat, 1 Aug 2015, Satoru KURASHIKI wrote:
> hi,
>
> I've tried to write babel extension for typescript.
> cf. https://github.com/lurdan/ob-typescript
>
> Because "results: code" forces same language in results,
> it outputs transpile results enclosed with #BEGIN_SRC js #END_SRC
> assuming "results: raw".
>
> I want it to do this with more sane way (not disturbing header parameters),
> are there any nice tweaks?
Not sure what you mean about 'disturbing header parameters', but using
:wrap src <lang>
where <lang> is the resulting language will fontify suitably.
For example, this shell script:
#+BEGIN_SRC shell :wrap src emacs-lisp
echo "(format fmt abc) ;; alphabet"
#+END_SRC
produces this result:
#+RESULTS:
#+BEGIN_src emacs-lisp
(format fmt abc) ;; alphabet
#+END_src
Perhaps, you want `org-babel-default-header-args:typescript' to include
(:wrap . "src js") and drop (:results . "raw").
HTH,
Chuck
next prev parent reply other threads:[~2015-08-01 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 2:35 Babel results in other lang code Satoru KURASHIKI
2015-08-01 19:20 ` Charles C. Berry [this message]
2015-08-04 11:18 ` Satoru KURASHIKI
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=alpine.OSX.2.11.1508011201560.562@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=lurdan@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.