dante
dante copied to clipboard
Dante forgets directory variables (dante-methods) from time to time
I have a Stack project and in .dir-locals.el
I have ((nil . ((dante-methods . (stack)))))
. When I load a file first time everything works fine but when I go to that file after some delay dante mode breaks and shows "Danté:stopped" on the status bar. After killing Dante with dante-destroy
and invoking dante-restart
when I run dante-info
I get a buffer with error message saying that Danté failed to load a nix-shell (not Stack).
At first just checking a directory variable failed and entering C-h v dante-mode
was failing with funcall-interactively: Wrong type argument: listp, "/home/qrilka/ws/h/hatrace/"
, after calling (hack-dir-local-variables-non-file-buffer)
I see a proper description:
dante-methods is a variable defined in ‘dante.el’.
Its value is (stack)
Original value was
(styx new-impure-nix new-nix nix impure-nix new-build nix-ghci stack mafia bare-cabal bare-ghci)
Local in buffer Hatrace.hs; global value is (stack)
This variable’s value is directory-local, set by the file
‘/home/qrilka/ws/h/hatrace/.dir-locals.el’.
This variable is safe as a file local variable if its value
satisfies the predicate ‘listp’.
Documentation:
Keys in ‘dante-methods-alist’ to try, in order.
Consider setting this variable as a directory variable.
You can customize this variable.
[back]
Would be grateful for any help to debug the situation as currently the only workaround I have is restarting Emacs every time which is annoying.