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 <gro...@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/