Conversation
|
@Pitometsu Can you see if this works for you? You also need to evaluate this: (setq haskell-interactive-use-interactive-prompt nil)
(setq haskell-interactive-prompt "FunnyPrint.prompt \"λ \" \"%s\" \" ¬\nλ > ") |
Some people do fancy stuff with the prompt (e.g. multiline, colouring). This offers some support for it. The haskell-interactive-mode-prompt-previous/next used the prompt regex to search for the prompt, but this doesn't work with variable prompts (i.e. containing module names). Now they use text property search.
| ":set +c") ; :type-at in GHC 8+ | ||
| "\n")) | ||
| (haskell-process-send-string process ":set prompt \"\\4\"") | ||
| (haskell-process-send-string process (format ":set prompt2 \"%s\"" |
There was a problem hiding this comment.
Please use haskell-string-literal-encode here, it can handle escapes the Haskell way.
|
We need to have automated tests for all of this functionality. People get offended very much if their colors stop working. There is some infrastructure for external interaction testing in https://github.com/haskell/haskell-mode/blob/master/tests/haskell-test-utils.el#L134 and with examples in https://github.com/haskell/haskell-mode/blob/master/tests/haskell-mode-tests.el#L577 . |
|
@fice-t, I understand next to nothing out of this, I just hope you can get this right :) |
|
I guess that depends on what you call 'right'. I think this way of having an extra
@gracjan Would you object to a manual parsing of their GHCi init file on the Elisp side? I was hoping to avoid that method, but it might be better than the alternatives. |
|
@fice-t, finding the |
|
Even if it's started from cabal or stack doesn't it still use, by default, the same init file? So there should only be 4 places to check according to the manual. And if people need a different one we could just make it a defcustom. |
|
With # stack.yaml
ghc-options:
"*": -ghci-script .ghci_confBecause otherwise |
|
@Pitometsu Doesn't Does putting your |
|
@fice-t well, it depend. UPD: also I have for this purpose: ;; custom.el
;; ...
'(haskell-process-args-cabal-repl
(quote
("--ghc-option=-ferror-spans" "--ghci-options=\" -ghci-script .ghci_conf\"" "--with-ghc=intero")))
'(haskell-process-args-stack-ghci
(quote
("--ghc-options=-ferror-spans" "--ghci-options=\" -ghci-script .ghci_conf\"" "--with-ghc=intero")))
'(haskell-program-name
"stack ghci --ghci-options=\" -ghci-script .ghci_conf\" --with-ghc=intero")
;; ... |
|
But if you intend to set prompt interactively after |
|
@fice-t So in general |
|
@fice-t sorry, have no ability to check your PR for some time. And now could help with testing it. Please, point me, if I can check something. |
|
Any updates here? |
|
@fice-t any updates? :) |
Some people do fancy stuff with the prompt (e.g. multiline, colouring).
This offers some support for it.
The haskell-interactive-mode-prompt-previous/next used the prompt regex
to search for the prompt, but this doesn't work with variable
prompts (i.e. containing module names). Now they use text property
search.
Closes #1353