From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Code block returning code results formatted as another type of code block? Date: Wed, 3 Feb 2016 21:03:59 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRC5V-0006oq-KN for emacs-orgmode@gnu.org; Thu, 04 Feb 2016 00:04:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRC5R-0002CI-K8 for emacs-orgmode@gnu.org; Thu, 04 Feb 2016 00:04:13 -0500 Received: from iport-bcv3-out.ucsd.edu ([132.239.0.89]:31484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRC5R-00025D-8z for emacs-orgmode@gnu.org; Thu, 04 Feb 2016 00:04:09 -0500 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: Brett Viren Cc: emacs-orgmode@gnu.org On Wed, 3 Feb 2016, Brett Viren wrote: > Hi, > > I have some shell command line program that spits out JSON. I want Org > execute that command from a source block (of type "sh") and have the > result displayed as another source block of type "json". Try `:wrap src json': #+BEGIN_SRC sh :exports both :results value code :wrap src json echo '{"foo":"bar", "baz":"quax"}' #+END_SRC #+RESULTS: #+BEGIN_src json {"foo":"bar", "baz":"quax"} #+END_src HTH, Chuck