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

Emacs hangs when typing behind whitespace #980

Closed
Lambdara opened this issue Nov 4, 2015 · 8 comments
Closed

Emacs hangs when typing behind whitespace #980

Lambdara opened this issue Nov 4, 2015 · 8 comments

Comments

@Lambdara
Copy link

Lambdara commented Nov 4, 2015

When in haskell-mode I experience the following problem:
If I use my enter key to go to a new line, indentation is already there for me (this is the case with all indentation modes). But that's not a problem of course. The problem comes when I use C-a to jump to the start of the line. If I type now, all my actions will have some delay; sometimes a little, other times a lot.

This looks like a bug to me, but I'm not very experienced with this (month or two) so maybe it's just a fuckup of mine.

@gracjan
Copy link
Contributor

gracjan commented Nov 4, 2015

Interesting. I do not observe this behavour. Do you have other modes enabled?

@Lambdara
Copy link
Author

Lambdara commented Nov 5, 2015

Not that I'm aware. I'll try a few things and see if I can find out under what circumstances it happens.

@Lambdara
Copy link
Author

Lambdara commented Nov 5, 2015

Here's an easy way to reproduce the problem:
Open a new .hs file. Fill one line with a lot of spaces, like a hundred. Now start typing at the start of the line.

It seems that the more spaces, the worse. I also experienced this when working in a very big file with just a few spaces, but never when I have no spaces in front of my cursor at all.

So basically the delay gets worse when there are spaces in front of your cursor. The more spaces, the worse. The more text in the file, the worse.

I have tested this with haskell-simple-indent and haskell-indent. It appears to not be a problem with emacs itself, as I don't experience any problems whatsoever when I do the same thing in the scratch buffer.

@Lambdara
Copy link
Author

Lambdara commented Nov 5, 2015

In other news, it also happens if I use a completely clean .emacs file. No indentation enabled whatsoever.

There's also this weird thing where if you start typing at the second character of the line there is no issue. Thereafter using arrows to navigate to the first character allows me to start typing in the normal way sometimes (not sure when it does and when it doesn't). However, just typing a lot of spaces and then using C-a to skip to the first character and then start typing always ruins my day.

To summarize the info so far:

  • The issue is that emacs freezes on every keypress
  • It happens after skipping to the start of the line with C-a, when the rest of the line consists of spaces, and in some other ways (of going to the start), but I couldn't see a real pattern there.
  • It happens in at least two of the indentation modes, and also when all indentation modes are disabled.
  • It only (as far as I know) happens in haskell-mode. At least a quick check in some other files revealed no problems to me (I've never had this problem in other files/modes, and at least the scratch buffer can take quite a few spaces without breaking)
  • It feels (can't really judge objectively on this) that the problem is worse when the file is large.
  • It is the case (definitely true) that the problem is worse when there are more spaces.

@gracjan
Copy link
Contributor

gracjan commented Nov 21, 2015

I tried to reproduce this but everything seems perfectly fine. Can anybody else try to help with this problem?

@gracjan
Copy link
Contributor

gracjan commented Dec 23, 2015

I cannot reproduce the problem. If anybody can do it please write a message here and we will reopen the issue.

@gracjan gracjan closed this as completed Dec 23, 2015
@Lambdara
Copy link
Author

After updating emacs just now, the problem is no longer there. As I was seemingly the only one with this issue, it can be regarded as solved.

@gracjan
Copy link
Contributor

gracjan commented Jan 26, 2016

Great, thanks.

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