From mboxrd@z Thu Jan 1 00:00:00 1970 From: emailorama Subject: [babel] Is ":results output inline" possible ? Date: Sun, 18 Oct 2009 22:48:13 -0700 (PDT) Message-ID: <638756.39548.qm@web111304.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mzl6U-00065C-2r for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 01:48:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mzl6N-0005wX-J5 for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 01:48:20 -0400 Received: from [199.232.76.173] (port=46934 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mzl6N-0005w1-8d for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 01:48:15 -0400 Received: from web111304.mail.gq1.yahoo.com ([67.195.15.149]:25444) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Mzl6M-00063R-Lc for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 01:48:14 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org The org-babel package looks very nice. Thanks to Eric for doing this. It seems to have so many possibilities. I wonder, is it possible to get "inline" output ? It seems to be very close to the existing option ":results output" but would just put the output "inline" rather than in a quoted block. (So maybe it would need a closing delimiter, as in the example below). This would allow writing a program to generate output in org-mode syntax. This effect might also be thought of as a sort of "multilingual" macro replacement. Right now I can get this effect by simply removing the ":" characters from the beginning of each line of the quoted block results. But it seems like there must be cleaner ways to do it. If not, could this be considered a feature request ? An example (demo) is shown below, in the ruby language. (although the idea is not specific to ruby - it would apply to other languages as well) I'm not sure what the best name such an option would be. Maybe "inline" or "org". Thank you for any thoughts about this, al ---------------------------------------- currently got ---------------------------------------- #+srcname: demoruby #+begin_src ruby :results output=20 require 'date' puts "* heading for demo" puts "This demo done on #{Date.today}" puts "Try to create a table in org-mode syntax" puts "| letter | number |" puts "|-----------------|" puts "| a | 1 |" puts "| b | 2 |" #+end_src #+resname: demoruby : * heading for demo : This demo done on 2009-10-19 : Try to create a table in org-mode syntax : | letter | number | : |-----------------| : | a | 1 | : | b | 2 | ---------------------------------------- would like something like this ---------------------------------------- #+srcname: demoruby #+begin_src ruby :results output inline require 'date' puts "* heading for demo" puts "This demo done on #{Date.today}" puts "Try to create a table in org-mode syntax" puts "| letter | number |" puts "|-----------------|" puts "| a | 1 |" puts "| b | 2 |" #+end_src #+resname: demoruby * heading for demo This demo done on 2009-10-19 Try to create a table in org-mode syntax | letter | number | |--------+--------| | a | 1 | | b | 2 | #+endresname: demoruby =0A=0A=0A