emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Is ":results output inline" possible ?
@ 2009-10-19  5:48 emailorama
  2009-10-19 13:51 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: emailorama @ 2009-10-19  5:48 UTC (permalink / raw)
  To: emacs-orgmode


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





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

end of thread, other threads:[~2009-10-19 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19  5:48 [babel] Is ":results output inline" possible ? emailorama
2009-10-19 13:51 ` 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).