From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Babel results in other lang code Date: Sat, 1 Aug 2015 12:20:23 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLcKd-0001HB-7W for emacs-orgmode@gnu.org; Sat, 01 Aug 2015 15:20:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLcKZ-0002KP-0M for emacs-orgmode@gnu.org; Sat, 01 Aug 2015 15:20:31 -0400 Received: from iport-acv5-out.ucsd.edu ([132.239.0.10]:15353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLcKY-0002J7-Mu for emacs-orgmode@gnu.org; Sat, 01 Aug 2015 15:20:26 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Satoru KURASHIKI Cc: emacs-orgmode@gnu.org 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 where 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