Skip to content

Conversation

@mkaschenko
Copy link
Contributor

@mkaschenko
Copy link
Contributor Author

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.

@dgutov
Copy link
Collaborator

dgutov commented Apr 25, 2016

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.

(inf-ruby-mode)
(make-local-variable 'inf-ruby-orig-compilation-mode)
(setq inf-ruby-orig-compilation-mode mode)
(set (make-local-variable 'inf-ruby-orig-compilation-mode) mode)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do the same for inf-ruby-orig-process-filter too, then?

@dgutov
Copy link
Collaborator

dgutov commented Aug 27, 2016

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

@mkaschenko
Copy link
Contributor Author

It's not finished yet. I will notify.

On Aug 27, 2016, at 07:03, Dmitry Gutov notifications@github.com 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants