Closed joshrendek closed 10 years ago
Try putting this into your init file:
(setenv "PAGER" (executable-find "cat"))
Also see #45.
I set the pager env and it did print out the prompt for pry, but I was unable to type or do anything interactive in the buffer. I didn't see anything in #45 that jumped out on how to help make the buffer interactive, but that could just be my lack of understanding.
Very interested to make this work. Willing to make a PR if you could explain exactly what needs to be done.
I didn't see anything in #45 that jumped out on how to help make the buffer interactive, but that could just be my lack of understanding.
- Install
inf-ruby
.- Put
(add-hook 'after-init-hook 'inf-ruby-switch-setup)
into your init file.- When you see the Pry prompt, press
C-x C-q
to switch the mode.
Nice. I was just coming back to comment that all I needed to do was hit C-x C-q to switch read-only off =)
It's slightly annoying that I have to type this before every command. Do you know of a way to either keep read-only disabled or automatically disable it once the returning to the prompt? Or is that nonstandard usage of comint mode?
all I needed to do was hit C-x C-q to switch read-only off =)
You're not really switching read-only. With the added binding, you're switching to inf-ruby-mode
.
Do you know of a way to either keep read-only disabled or automatically disable it once the returning to the prompt? Or is that nonstandard usage of comint mode?
There may be different ways, but as soon as we switch to inf-ruby-mode
, we lose the highlighting of RSpec compilation errors (until we switch back). That's a definite drawback.
It might be worth exploring whether running compilation in a mode deriving from inf-ruby-mode
can be not less performant, would also highlight errors, etc. inf-ruby-mode
also enables compilation-shell-minor-mode
, which should provide most or all of the related features, so it should be mostly a matter of porting new font-lock rules and error regexp settings.
The default compile
command also has the option of running in comint-mode
(when called with prefix). I'm not sure, though, why the separation even exists.
I get this when inserting a binding.pry: