From mboxrd@z Thu Jan 1 00:00:00 1970 From: Burton Samograd Subject: Re: Put result output in different type of code block than original Date: Tue, 11 Oct 2011 10:01:30 -0600 Message-ID: <87zkh7qzz9.fsf@interalia.com> References: <80sjmz7hf9.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDfDg-0003zL-K3 for emacs-orgmode@gnu.org; Tue, 11 Oct 2011 12:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDfDb-00029N-LB for emacs-orgmode@gnu.org; Tue, 11 Oct 2011 12:30:20 -0400 Received: from lo.gmane.org ([80.91.229.12]:53198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDfDb-000296-Fy for emacs-orgmode@gnu.org; Tue, 11 Oct 2011 12:30:15 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RDfDW-00063u-No for emacs-orgmode@gnu.org; Tue, 11 Oct 2011 18:30:10 +0200 Received: from 209.89.22.115 ([209.89.22.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Oct 2011 18:30:10 +0200 Received: from bsamograd by 209.89.22.115 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Oct 2011 18:30:10 +0200 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@gnu.org "Sebastien Vauban" writes: > Hi Rainer and Niels, > > Rainer M Krug wrote: >> On Mon, Oct 10, 2011 at 5:44 PM, Niels Giesen wrote: >>> 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? > > FYI, this is a need I also have, for example AWK outputting SQL code. There > has been some threads about this, but nothing is implemented so far in this > direction. > >>> #+begin_src sh :results output code :exports both >>> curl >>> https://our-service.org/getstuff?username=dirk\&password=catsbrithday\&fmt=json >>> #+end_src >> >> Does >> >> #+begin_src sh :results output :exports both >> echo #+BEGIN_SRC json >> curl >> https://our-service.org/getstuff?username=dirk\&password=catsbrithday\&fmt=json >> echo #+END_SRC >> #+end_src >> >> help? > > I like very much the idea of your workaround. Great thought! > > Though, nope, it does not help the OP, because the echo lines don't output > anything here, as # is the symbol to begin a comment (in shell scripts). So, > the first line simply outputs a blank line... Could you escape the comment character by using \#? -- Burton Samograd