haskell / haskell-mode

Emacs mode for Haskell
http://haskell.github.io/haskell-mode/
GNU General Public License v3.0
1.33k stars 341 forks source link

haskell-mode interferes with magit-blame #1510

Open CyberShadow opened 7 years ago

CyberShadow commented 7 years ago

Running magit-blame on a file with haskell-mode causes the RET key, which should normally run magit-show-commit, to instead attempt to run haskell-indentation-newline-and-indent (which doesn't do what is expected and fails).

Instead of changing the key binding of the RET key in haskell-indentation-mode-map, can haskell-indentation-newline-and-indent be implemented on top of the regular newline-and-indent by providing its custom indent-line-function?

ivan-m commented 7 years ago

I haven't noticed any issues with haskell-mode and magit-blame; that said, I'm not using haskell-indentation-mode (I prefer shm).

Can you maybe try with haskell-indent-mode and see if that solves anything?

CyberShadow commented 7 years ago

I've done zero setup other than installing haskell-mode as per https://wiki.haskell.org/Emacs.

If haskell-indent-mode is the preferred option, then perhaps it should be made the default?

ivan-m commented 7 years ago

I keep forgetting which is the preferred option; I just know it's the other main one available and trying that could help narrow down whether it was the indentation mode at fault or some other configuration error.

CyberShadow commented 7 years ago

It works with haskell-indent-mode.

ivan-m commented 7 years ago

So the issue is definitely with haskell-indentation-mode; at least we know it's not all of haskell-mode that's broken ;-)

gracjan commented 7 years ago

@CyberShadow: For mundane reasons haskell-indentation-mode takes over TAB, Shift-TAB and RET. Mechanism provided by indent-line-function works best for languages that have indentation derived from parentheses, i. e. non-semantic indentation. That is the explanation for current state.

Now, it would be much better if haskell-indentation-mode did not intefere with anything. Anybody out there willing to take a look?