emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Put result output in different type of code block than original
@ 2011-10-10 15:44 Niels Giesen
  2011-10-11  8:55 ` Rasmus Pank Roulund
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Niels Giesen @ 2011-10-10 15:44 UTC (permalink / raw)
  To: emacs-orgmode list

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1585 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-11 20:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 15:44 Put result output in different type of code block than original Niels Giesen
2011-10-11  8:55 ` Rasmus Pank Roulund
2011-10-11  9:06 ` Rainer M Krug
2011-10-11 14:04   ` Sebastien Vauban
2011-10-11 16:01     ` Burton Samograd
2011-10-11 16:52       ` Sebastien Vauban
2011-10-11 20:55         ` Niels Giesen
2011-10-11 14:32 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).