[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Babel results in other lang code
From: |
Charles C. Berry |
Subject: |
Re: [O] Babel results in other lang code |
Date: |
Sat, 1 Aug 2015 12:20:23 -0700 |
User-agent: |
Alpine 2.11 (OSX 23 2013-08-11) |
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
- Re: [O] Babel results in other lang code,
Charles C. Berry <=