From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] Is ":results output inline" possible ? Date: Mon, 19 Oct 2009 07:51:41 -0600 Message-ID: References: <638756.39548.qm@web111304.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzseO-0005JS-S8 for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 09:51:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzseI-0005Ia-MG for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 09:51:51 -0400 Received: from [199.232.76.173] (port=52388 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzseI-0005IX-JL for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 09:51:46 -0400 Received: from mail-pz0-f190.google.com ([209.85.222.190]:65506) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzseI-0005D2-5I for emacs-orgmode@gnu.org; Mon, 19 Oct 2009 09:51:46 -0400 Received: by pzk28 with SMTP id 28so3292883pzk.27 for ; Mon, 19 Oct 2009 06:51:44 -0700 (PDT) In-Reply-To: <638756.39548.qm@web111304.mail.gq1.yahoo.com> (emailorama@yahoo.com.au's message of "Sun, 18 Oct 2009 22:48:13 -0700 (PDT)") 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: emailorama Cc: emacs-orgmode@gnu.org Hi al, This is currently possible by adding either "raw" or "org" to your results headers. So the following should work. #+srcname: demoruby #+begin_src ruby :results output org 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 I need to update the documentation to reflect some of the more recent development. Best -- Eric emailorama writes: > 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 > 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 > > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode