emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [babel] Is ":results output inline" possible ?


From: Eric Schulte
Subject: Re: [Orgmode] [babel] Is ":results output inline" possible ?
Date: Mon, 19 Oct 2009 07:51:41 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

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 <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode




reply via email to

[Prev in Thread] Current Thread [Next in Thread]