emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: emailorama <emailorama@yahoo.com.au>
To: emacs-orgmode@gnu.org
Subject: [babel] Is ":results output inline" possible ?
Date: Sun, 18 Oct 2009 22:48:13 -0700 (PDT)	[thread overview]
Message-ID: <638756.39548.qm@web111304.mail.gq1.yahoo.com> (raw)


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





             reply	other threads:[~2009-10-19  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19  5:48 emailorama [this message]
2009-10-19 13:51 ` [babel] Is ":results output inline" possible ? Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=638756.39548.qm@web111304.mail.gq1.yahoo.com \
    --to=emailorama@yahoo.com.au \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).