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

Make haskell process' log always scroll to bottom #633

Closed
geraldus opened this issue May 8, 2015 · 3 comments
Closed

Make haskell process' log always scroll to bottom #633

geraldus opened this issue May 8, 2015 · 3 comments

Comments

@geraldus
Copy link
Contributor

geraldus commented May 8, 2015

I opened this as reminder for future work and also to discuss issue subject. Usually I use log to see compilation progress, and it annoys me because I always have to scroll it manually. There are some rare cases when log is scrolled to bottom automatically.
So the plan is to find all print to log relating stuff and add scrolling to bottom action after that. Maybe we should have a special function for that? This will make possible to have some customisation like Scroll Log To Bottom in case if user do not want log to autoscroll.

@gracjan
Copy link
Contributor

gracjan commented May 8, 2015

Please use the trick from Microsoft VisualStudio output buffer:

  1. If the point is at the end of the buffer, then append and move the point to the end of the buffer again (effectively inserting before). Otherwise just append.
  2. If the window scroll position is at the end, then scroll to the new end after inserting, otherwise do not scroll.

No settings needed.

@gracjan
Copy link
Contributor

gracjan commented May 8, 2015

Check out auto-revert-tail-mode:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Reverting.html

@geraldus
Copy link
Contributor Author

Check out auto-revert-tail-mode

Auto-revert works only for file based buffers.

  1. If the point is at the end of the buffer, then append and move the point to the end of the buffer again (effectively inserting before). Otherwise just append.
  2. If the window scroll position is at the end, then scroll to the new end after inserting, otherwise do not scroll.

So

remember is scroll at the end
effective append
scroll according to remembered val

Right?

I hope that haskell-process-log is the only one way used to log stuff. I can update it. Also I think that we should have an option to truncate log to some fixed number of lines (like eshell does via custom var).

@gracjan gracjan closed this as completed May 13, 2015
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

No branches or pull requests

2 participants