Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to end of buffer when switch from compilation #87

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

(let ((mode major-mode)
(arguments compilation-arguments))
(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 [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.

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