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

Bizarre conflict with auto-revert-mode #97

Closed
raxod502 opened this issue Oct 16, 2016 · 4 comments
Closed

Bizarre conflict with auto-revert-mode #97

raxod502 opened this issue Oct 16, 2016 · 4 comments

Comments

@raxod502
Copy link
Contributor

raxod502 commented Oct 16, 2016

I've been gradually driven crazy over the last several months with the symptoms of this problem, but it wasn't until you introduced the aggressive-indent-sit-for-time variable (thanks!) that I was finally able to track it down reproducibly. Now, it appears to me that the issue may have been fixed just a few hours ago in commit 2f54a58 (in which case this can be closed), but I had to deal with this problem for a long time and couldn't find any information about how to reproduce it, so I think it should be reported.

Here is what you need to do from emacs -Q with a pre- 2f54a58 aggressive-indent:

(load-file "~/path/to/aggressive-indent.el")
(aggressive-indent-mode 1)
(setq aggressive-indent-sit-for-time 1)
(auto-revert-mode 1)

Now, the problem still exists without increasing aggressive-indent-sit-for-time, but it's virtually impossible to reproduce consistently with the default settings since the behavior only occurs when you press a key within aggressive-indent-sit-for-time.

Here are a few of the funky things that start happening once all of the above setup is done:

  • If you type too quickly (i.e. with less than one second between successive keypresses), often half of your keypresses will be silently dropped.
  • In the terminal, if you type an open paren and then press e.g. the right arrow key, the text OC is inserted instead of the cursor moving. With aggressive-indent-sit-for-time increased to one second, you can mash the arrow keys to get a long string of OAOBOAOCOD inserted into your buffer, as long as the delay between successive keypresses is less than one second. I bet this is because the ESC keypress is being dropped as per the previous bullet point.

My experience before figuring this out was that as long as aggressive-indent-mode was enabled, sometimes (perhaps once every few days, with no discernible pattern), my keypresses would start occasionally being silently dropped, or A-D would occasionally be inserted into my buffer when I pressed an arrow key, or the meta key would be pressed for me (turning e.g. previous-line into paredit-splice-sexp-killing-backward -- very fun). I now think that the occurrences must have been roughly correlated with the performance of aggressive-indent (which would of course be very nondeterministic and difficult to predict). That is, when aggressive-indent was running slowly, it would have the same effect as increasing aggressive-indent-sit-for-time.

Hope this information helps.

@raxod502
Copy link
Contributor Author

Actually, I think this is still happening :(

@raxod502
Copy link
Contributor Author

I wonder if it has anything to do with syl20bnr/spacemacs#5413 ?

@raxod502
Copy link
Contributor Author

I'll leave this issue closed unless I can come up with some productive way to provide directions to reproduce.

@raxod502
Copy link
Contributor Author

This was a manifestation of the buggy behavior of while-no-input discussed in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31692.

cc @Malabarba

I suggest modifying the code currently in aggressive-indent so that people don't encounter this problem on Emacs 26.

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

1 participant