emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Adding xmpfilter as a results type


From: Eric Schulte
Subject: Re: [O] Adding xmpfilter as a results type
Date: Fri, 10 Jun 2011 10:52:06 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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 <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]