The set-up recommended in the readme when used with git-emacs leads to errors like "HEAD:src/: no such directory" for Haskell source files when I use git-diff-head (C-x g d RET). The problem appears to be in the invocation of dante-mode in order to prettify a copy of the source buffer for the diff, as in the following Emacs Lisp stack trace:
The value of haskell-mode-hook is (flycheck-mode dante-mode haskell-auto-insert-module-template my-haskell-mode-hook interactive-haskell-mode). If I swap the first two hooks, the problem vanishes.
To fix this issue, I've modified my dante setup to be the following:
(use-package dante
:ensure t
:after haskell-mode
:commands 'dante-mode
:init
(add-hook 'haskell-mode-hook 'flycheck-mode)
;; OR:
;; (add-hook 'haskell-mode-hook 'flymake-mode)
;; Git-emacs chokes if flycheck-mode comes after dante-mode, e.g.,
;; "HEAD:src/: no such directory"
(add-hook 'haskell-mode-hook 'dante-mode)
)
The set-up recommended in the readme when used with git-emacs leads to errors like "HEAD:src/: no such directory" for Haskell source files when I use
git-diff-head
(C-x g d RET
). The problem appears to be in the invocation ofdante-mode
in order to prettify a copy of the source buffer for the diff, as in the following Emacs Lisp stack trace:The value of
haskell-mode-hook
is(flycheck-mode dante-mode haskell-auto-insert-module-template my-haskell-mode-hook interactive-haskell-mode)
. If I swap the first two hooks, the problem vanishes.To fix this issue, I've modified my dante setup to be the following: