nonsequitur / inf-ruby

218 stars 69 forks source link

Eval-to-comment a'la Clojure's Cider #126

Closed idrozd closed 5 years ago

idrozd commented 5 years ago

Hi!

Can you give some directions on how one would implement Eval-to-comment-under-region a'la Clojure's Cider?

And maybe some readable elisp reference?)

dgutov commented 5 years ago

Hey)

Check out ruby-send-region and especially ruby-print-result which it delegates to when called with a non-nil third argument.

To try it out, type C-u C-c C-r after selecting an expression with a region. To print the result in a comment instead you'd have to create a modified version of the latter function.

tunnes commented 2 years ago

@idrozd Did you manage to do this? I'm trying to find exactly this feature that you were looking for, but with no success so far.