emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: avdi@avdi.org
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Adding xmpfilter as a results type
Date: Fri, 10 Jun 2011 10:52:06 -0600	[thread overview]
Message-ID: <87fwnhvdc9.fsf@gmail.com> (raw)
In-Reply-To: <BANLkTin75CmMqhnvApjzN7ZHuuxM3FSKXw@mail.gmail.com> (Avdi Grimm's message of "Fri, 10 Jun 2011 00:42:13 -0400")

Hi Avdi,

Good idea!  This was easy to implement (the hardest part was installing
rcodetools).  The current Org-mode git head now supports a new result
type "xmp" which behaves as follows...

  #+begin_src ruby :results xmp code
    2 + 2 # =>
    3.times{ puts :hello }
  #+end_src

  #+results:
  #+BEGIN_SRC ruby
  2 + 2 # => 4
  3.times{ puts :hello }
  # >> hello
  # >> hello
  # >> hello
  #+END_SRC

Cheers -- Eric

Avdi Grimm <groups@inbox.avdi.org> writes:

> Something I've been thinking about lately...
>
> If you have used Ruby you might be familiar with the 'xmpfilter'
> command which comes in the 'rcodetools' package. It's a filter that
> annotates a source file with the results of expressions, so:
>
>     1 + 1 # =>
>
> When run through xmpfilter would become:
>
>     1 + 1 # => 2
>
> There's already an rcodetools.el which makes it pretty easy to run
> xmpfilter over the current region, or a whole buffer of Ruby code. But
> it would be sweet if this could become an alternate :results type for
> Ruby source listings, so I could just hit C-c C-c and get the
> xmpfilter version of the code.
>
> Any thoughts on how to make this work?

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

      reply	other threads:[~2011-06-10 16:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10  4:42 Adding xmpfilter as a results type Avdi Grimm
2011-06-10 16:52 ` 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=87fwnhvdc9.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=avdi@avdi.org \
    --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).