[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Don't override 'comint-prompt-read-only' by default
From: |
Philip Kaludercic |
Subject: |
Re: [PATCH] Don't override 'comint-prompt-read-only' by default |
Date: |
Sun, 15 Sep 2024 15:48:00 +0000 |
Stefan Kangas <stefankangas@gmail.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> I am proposing this change here, because I am aware it might be
>> controversial. My motivation is to have more consistent inferior modes,
>> and not have to be surprised that (as in my case right now,
>> inferior-python-mode doesn't allow be to kill a prompt). I haven't
>> written a NEWS entry yet, but it should probably mention that anyone
>> interested in restoring the old behaviour should just set
>> 'comint-prompt-read-only' directly.
>>
>> WDYT?
>
> Making `comint-prompt-read-only` nil in more modes seems like a step
> backwards to me though; if anything I'd like to make it t in more
> places. I'm actually not sure why it does not already default to t.
> That's certainly the default in any REPL that I can think of, so our
> default breaks most user expectations.
>
> See, for example, users asking questions on StackOverflow like "How to
> prevent backspace from deleting my shell prompt":
> https://emacs.stackexchange.com/questions/21751/how-to-prevent-backspace-from-deleting-my-shell-prompt
>
> It makes sense to have the option to be able delete the prompt, though
> my preferred UI for that is closer to something like hitting `C-w` twice
> (the second time to confirm) rather than setting a variable. I just
> feel like this is highly situation dependent: most of the time I do not
> want backspace to delete the prompt, but maybe occasionally I do.
>
> That said, if we can agree to flip `comint-prompt-read-only` to t,
> I think your patch should definitely be installed.
>
> My $.02.
I personally wouldn't be a fan, as I think that there is a value in
realising that comint is just a regular buffer and you can edit any way
you like. That being said, I do understand the issue that newcomers
have when they are used to deleting a line by waiting on backspace
instead of using a command like `kill-whole-line'.
But regardless, we can split this up into two patches. All I want it to
ensure consistency; perhaps we can discuss what the default should be on
emacs-devel?
--
Philip Kaludercic on icterid