I want to clear the ghci
screen of the haskell-mode
,
I used erase-buffer
in emacs shell, and I works, but when I do so with ghci
inside emacs, This message appears:
Text is read-only
I want to clear the ghci
screen of the haskell-mode
,
I used erase-buffer
in emacs shell, and I works, but when I do so with ghci
inside emacs, This message appears:
Text is read-only
In haskell-mode
, C-c C-l
calls haskell-process-load-or-reload
, and you go into a sub-mode called haskell-cabal-mode-map
.
In that mode there is a command haskell-interactive-mode-clear
to clear the ghci
buffer. (erase-buffer
does not work, because the buffer is read-only so you cannot erase it)
So You can map haskell-interactive-mode-clear
like that:
(eval-after-load 'haskell-cabal '(progn
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)