From mboxrd@z Thu Jan 1 00:00:00 1970 From: Niels Giesen Subject: Put result output in different type of code block than original Date: Mon, 10 Oct 2011 17:44:57 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00148536e6464e106504aef3ac85 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDI2G-0005rA-R0 for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 11:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDI2F-0004t7-C7 for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 11:45:00 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:61155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDI2F-0004sz-34 for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 11:44:59 -0400 Received: by qyl38 with SMTP id 38so2468328qyl.0 for ; Mon, 10 Oct 2011 08:44:58 -0700 (PDT) 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: emacs-orgmode list --00148536e6464e106504aef3ac85 Content-Type: text/plain; charset=UTF-8 Hi, Say I've got a sh code block invoking curl to some json api, is it possible some way to specify that the format of the output when :results output code is in a json code block and *not* a sh code block? #+begin_src sh :results output code :exports both curl https://our-service.org/getstuff?username=dirk\&password=catsbrithday\&fmt=json #+end_src #+results: #+BEGIN_SRC sh {"userinfo" : {"id" : "QNCNFQUKKBCTTMAOIUFNOQVLDUFAJV", "fullname" : "Gekke Dirk", "role" : "user"}} #+END_SRC whereas I'd like it to be #+results: #+BEGIN_SRC json {"userinfo" : {"id" : "QNCNFQUKKBCTTMAOIUFNOQVLDUFAJV", "fullname" : "Gekke Dirk", "role" : "user"}} #+END_SRC Any thoughts on how to go about this? Do other people have this same issue and should there come an option in babel that handles this (one language outputting source code for another?), or is there a way to specify ones own outputter? -- http://pft.github.com --00148536e6464e106504aef3ac85 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

Say I've got a sh code block invoking curl to so= me json api, is it possible some way to specify that the format of the outp= ut when :results output code is in a json code block and *not* a sh code bl= ock?

#+begin_src sh :results output code :exports both<= /div>
#+end_src

#+results:
#+BEGIN_S= RC sh
{"userinfo" : {"id" : "QNCNFQUKKBC= TTMAOIUFNOQVLDUFAJV", "fullname" : "Gekke Dirk", &= quot;role" : "user"}}
#+END_SRC

whereas I'd like it to be= =C2=A0

#+results:
#+BEGIN_SRC json
{"userinfo" : {"id" : "QNCNFQUKKBCTTMAOIUFNOQVLDUF= AJV", "fullname" : "Gekke Dirk", "role" = : "user"}}
#+END_SRC

Any thoughts on how to go about this? Do other people have this same issue = and should there come an option in babel that handles this (one language ou= tputting source code for another?), or is there a way to specify ones own o= utputter?

--=C2=A0
http://= pft.github.com
--00148536e6464e106504aef3ac85--