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

haskell-simple-indent-mode non-responsive #867

Closed
ghost opened this issue Sep 12, 2015 · 20 comments
Closed

haskell-simple-indent-mode non-responsive #867

ghost opened this issue Sep 12, 2015 · 20 comments

Comments

@ghost
Copy link

ghost commented Sep 12, 2015

When I enable haskell-simple-indent-mode, and attempt to do anything other than indent in haskell mode, emacs becomes non responsive. Hitting C-g will cause it to interrupt, and throw an error regarding undo and the undo size, when I finally get my input in the buffer, it appears backwards. print will appear as tnirp.

The Warnings buffer shows the following:

Warning (undo): Buffer `*Org Src honors-cs108.org[ haskell ]*' undo info was 15968301 bytes long.
The undo info was discarded because it exceeded `undo-outer-limit'.

This is normal if you executed a command that made a huge change
to the buffer.  In that case, to prevent similar problems in the
future, set `undo-outer-limit' to a value that is large enough to
cover the maximum size of normal changes you expect a single
command to make, but not so large that it might exceed the
maximum memory allotted to Emacs.

If you did not execute any such command, the situation is
probably due to a bug and you should report it.

You can disable the popping up of this buffer by adding the entry
(undo discard-info) to the user option `warning-suppress-types',
which is defined in the `warnings' library.

Any suggestions/recommendations?

@gracjan
Copy link
Contributor

gracjan commented Sep 12, 2015 via email

@e3home
Copy link

e3home commented Sep 12, 2015

Only in the embedded source. Indentation doesn't seem to work at all for me however (I can't just have an expression at the start of the line, it's always insistent on having it indented to some level (generally 2)). I'm not entirely sure why this is.

@ivan-m
Copy link
Contributor

ivan-m commented Sep 13, 2015

Probably an interaction between org-mode's tabbing and haskell-mode. What does C-h k <tab> say?

@e3home
Copy link

e3home commented Sep 13, 2015

Currently, yas-expand. After disabling yasnippet, it shows as indent-for-tab-command. The use of haskell-simple-indent-mode bogs down the emacs process, I've switched to haskell-indent-mode, but still have the issue of incorrect indentation.

And to the org-mode tabbing issue, I enter the code block using C-c ;, and edit it directly in haskell-mode.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015

We had some reports about yas causing issues. You may want to search archives. AFAIK we weren't able to find what is going on.

Having said that can you try haskell-indentation-mode?

@e3home
Copy link

e3home commented Sep 13, 2015

Sure. It doesn't lock things up, but I still get weird indentation. I.E.:

print ""
  print ""

Even though I'd rather have something like

print ""
print ""

And actually, for every character I type, it indents a little bit more.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

I did. That's when I the get wonky indentation. No idea why, no messages printed about it. I disable yas-minor-mode in haskell-mode, so that shouldn't be causing a problem.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

I do have it enabled (well, did). I went ahead and disabled it in Haskell mode, and it works as expected. Thanks.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

It's enabled globally. Adding a hook function to purposely disable it and aggressive-indent-mode fixed it.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

An add-on to electric-indent-mode. It indents stuff even more automatically than aggressive indent mode. I use it when writing lisp (which I do a lot).

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

Wrong kind of lisp. I do a lot of DB and web stuff, emacs lisp is not my forte.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 13, 2015

Might as well try, but as it is, I'm learning haskell, so having someone who doesn't know the language working on its major mode doesn't seem like a good idea...

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015 via email

@e3home
Copy link

e3home commented Sep 14, 2015

I'll think about it, but I need to take care of other things (school) first. And I'd like to get access to my primary GH account first anyways.

@gracjan gracjan closed this as completed Oct 8, 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

3 participants