inf-ruby icon indicating copy to clipboard operation
inf-ruby copied to clipboard

Jump to end of buffer when switch from compilation

Open mkaschenko opened this issue 9 years ago • 4 comments

https://github.com/pezra/rspec-mode/issues/143#issuecomment-212206357

mkaschenko avatar Apr 25 '16 04:04 mkaschenko

While it works as expected when inf-ruby-switch-from-compilation is called interactively, it's a bit more tricky when if-ruby-switch-from-compilation is called within inf-ruby-auto-enter. The point is still in the beginning.

I think the reason for that is: rspec-mode/rspec-compile calls compile/compile which calls compilation-start. There is code inside compilation-start which pushes the point back to the top based on compilation-scroll-output variable.

mkaschenko avatar Apr 25 '16 04:04 mkaschenko

I think the reason for that is: rspec-mode/rspec-compile calls compile/compile which calls compilation-start. There is code inside compilation-start which pushes the point back to the top based on compilation-scroll-output variable.

Try (setq compilation-filter-start (point-max)) instead of (goto-char (point-max)), in inf-ruby-auto-enter.

If that doesn't work, replacing (inf-ruby-switch-from-compilation) with (run-with-idle-timer 0 nil #'inf-ruby-maybe-switch-from-compilation) should. But that's a bit uglier.

dgutov avatar Apr 25 '16 22:04 dgutov

@mkaschenko Please notify when it's ready to be merged. Looking at the current diff, it doesn't seem to address the problem you mentioned.

dgutov avatar Aug 27 '16 00:08 dgutov

It's not finished yet. I will notify.

On Aug 27, 2016, at 07:03, Dmitry Gutov [email protected] wrote:

@mkaschenko Please notify when it's ready to be merged. Looking at the current diff, it doesn't seem to address the problem you mentioned.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mkaschenko avatar Aug 27 '16 00:08 mkaschenko