emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: emailorama <emailorama@yahoo.com.au>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] Is ":results output inline" possible ?
Date: Mon, 19 Oct 2009 07:51:41 -0600	[thread overview]
Message-ID: <m2zl7nwkya.fsf@gmail.com> (raw)
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)")

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 <emailorama@yahoo.com.au> 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

      reply	other threads:[~2009-10-19 13:51 UTC|newest]

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

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=m2zl7nwkya.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=emailorama@yahoo.com.au \
    /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).