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

How do I disable the scrolling in buffer, when typing something to complete? #32

Closed
lczch opened this issue Dec 22, 2015 · 12 comments
Closed

Comments

@lczch
Copy link

lczch commented Dec 22, 2015

Sorry, I read your responds late in Issue #8 .
When using auto-complete-context and auto-complete-search-results,
the scrolling in buffer *goals* or *response* is somewhat annoying.
I already read some code in company-coq.el, and guess the problem may
in the function company-coq-search-then-scroll-up.
Your code is beautiful ~

I read the detail in Issue #8 , and reinstalled company-coq and PG, but problem
not disappeared.

Detailed situation:
For example, when I open an empty ".v" file, and type SearchAbout "_",
then there's a list lemmas in *response* buffer.
I find the lemma True_rect in line 81 is what I need.
Then, naturally, I keep typing "apply True_rect" while staring at *response*.
To my annoy, as I'm just typing "apply True" and the company menu is appearing,
*response* buffer automatically scrolls to the beginning of the buffer, and I lose
my focus. ( In my window, I need to use several PageDown jumping to line 81 from line 1)

Version information:
Emacs: 24.3
company-coq: 20150718 from melpa
PG: latest from github

Thank for your help~

@cpitclaudel
Copy link
Owner

Ah, thanks, I understand now. The trick is that in #8 I saved the position of the goals buffer, but not the response buffer. Let me have a look.

cpitclaudel added a commit that referenced this issue Dec 22, 2015
Should fix #32. Needs a bit more testing, though, as window positions
were only saved in very few places before.
@cpitclaudel
Copy link
Owner

Should be fixed on the massive-cleanup branch. Do you feel comfortable trying that branch out? Your help with testing this (and the refactoring that I've been working on) would be very welcome!

@lczch
Copy link
Author

lczch commented Dec 23, 2015

Yes, I'm very glad to ~

2015-12-22 23:40 GMT+08:00 Clément Pit--Claudel notifications@github.com:

Should be fixed on the massive-cleanup branch. Do you feel comfortable
trying that branch out? Your help with testing this (and the refactoring
that I've been working on) would be very welcome!


Reply to this email directly or view it on GitHub
#32 (comment)
.

@lczch
Copy link
Author

lczch commented Dec 23, 2015

But I'm curious that may this intelligent scrolling in buffer become a
feature that can be turned on/off?

2015-12-23 8:54 GMT+08:00 Zhaohui Li lizhaohui1991@gmail.com:

Yes, I'm very glad to ~

2015-12-22 23:40 GMT+08:00 Clément Pit--Claudel notifications@github.com
:

Should be fixed on the massive-cleanup branch. Do you feel comfortable
trying that branch out? Your help with testing this (and the refactoring
that I've been working on) would be very welcome!


Reply to this email directly or view it on GitHub
#32 (comment)
.

@cpitclaudel
Copy link
Owner

Do you see any case where preventing the buffer from randomly scrolling wouldn't be the desired behaviour? If so, we can make it an option.

@lczch
Copy link
Author

lczch commented Dec 24, 2015

I have test the feature.
This time, the point will always return to what I am focusing in
responds,
but the window keep flashing while I am typing.
The flash seems caused by point continue moving between (point-min) and my
focus point.
Is this fit what the fix should be?

2015-12-23 15:23 GMT+08:00 Clément Pit--Claudel notifications@github.com:

Do you see any case where preventing the buffer from randomly scrolling
wouldn't be the desired behaviour? If so, we can make it an option.


Reply to this email directly or view it on GitHub
#32 (comment)
.

@cpitclaudel
Copy link
Owner

Yes, unfortunately. There's no better way to prevent the flickering from company-coq (I'll add a patch to Proof General soon, and then things should be better).

@lczch
Copy link
Author

lczch commented Dec 25, 2015

It's sounds very cool to fix Proof General directly ~
Good hacking ~

@cpitclaudel
Copy link
Owner

This should be fixed in the https://github.com/ProofGeneral/PG/tree/fix-scrolling-buffers branch of PG. Maybe you could try it?

cpitclaudel added a commit that referenced this issue Jan 5, 2016
This is another instance of #32 (see also comment in source)
@lczch
Copy link
Author

lczch commented Feb 2, 2016

Sorry for delay respons...
I tried your fixed branch of PG, it's wonderful~

2016-01-01 0:55 GMT+08:00 Clément Pit--Claudel notifications@github.com:

This should be fixed in the
https://github.com/ProofGeneral/PG/tree/fix-scrolling-buffers branch of
PG. Maybe you could try it?


Reply to this email directly or view it on GitHub
#32 (comment)
.

@cpitclaudel
Copy link
Owner

Great! I merged the branch, too, so the fix should be available to everyone :)

@cpitclaudel
Copy link
Owner

Thanks for your help!

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