-
Notifications
You must be signed in to change notification settings - Fork 349
Make most interactive text optionally writable #1444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Text that was explicitly documented as read-only is still unconditionally read-only.
We cannot burden our users with decisions about such minutae details. We should make this decision ourselves: should this buffer be read-only or should it be read-write? |
I don't think a couple variables are much of a burden. The prompt being read-only should at least be a customization option. There's two precedents for it:
Part of me likes it being read-only since it protects you from accidentally overwriting part of the output, forgetting about it, and then thinking that was the actual output. Though that situation is rare enough, so either way is fine. I suppose it being read-write is more in-line with other Emacs REPLs. |
How about we use |
Even |
I'm seeing such code in (add-hook 'comint-mode-hook
(lambda ()
(define-key comint-mode-map [remap kill-region] 'comint-kill-region)
(define-key comint-mode-map [remap kill-whole-line]
'comint-kill-whole-line))) It may be a good combination to make prompt read only (do not editable by backspace/delete) but still be able to remove it by |
And what will happen if you accidentally erase |
I've merged as is. We will never know if anybody has found these two options and changed their value. |
Nothing will happen when Current behaviour is more or less OK. We get read-only output by default but can change it via options. |
Oh, I was going to slim it down to the one option, but if you do
Well, I'm not sure if it's really worth it to do it in this package. If you'd like, you can leave the prompt read-only and just put this in your init file: (add-hook 'haskell-interactive-mode
(lambda ()
(require 'comint)
(define-key haskell-interactive-mode-map [remap kill-region] 'comint-kill-region)
(define-key haskell-interactive-mode-map [remap kill-whole-line]
'comint-kill-whole-line))) |
Text that was explicitly documented as read-only is still
unconditionally read-only.
Fixes #1437.