Subject: bug#64619: [PATCH] Add toggle-window-dedicated command

From: Gregory Heytings <[email-masked]>
Date: Sat, 19 Aug 2023 20:37:31 +0000

>> This makes the window "strongly" dedicated, which is more in line with 
>> what "Window will now display only its current buffer" promises (e.g. 
>> C-x b will refuse to switch to another buffer).
>
> Ah, see earlier discussion.
>

Sorry, I missed that in the earlier discussion.

>
> We at least want to be able to choose between strong and non-strong 
> dedication.  And having used this command I think non-strong dedication 
> is a much better default, since it allows users to explicitly run C-x b 
> to change buffers without having to switch off dedication.
>

I agree with Drew here: strong dedication would be a better default.  The 
fact that the window was weakly dedicated and that I could switch to 
another buffer without any warning or confirmation surprised me when I 
tried your patch, hence my reaction.  Dedicating a window to a buffer is 
somewhat like making a buffer read-only, and I guess "weak read-onlyness" 
would be surprising to most users.

>> 2. I would not bind it to the "d" key but to the "!" key: ISTM that 
>> toggling window dedication is not such a common action that it needs a 
>> letter key binding.
>
> It's not common at the moment, but I expect some users will use this 
> command quite frequently.  Also the C-x w prefix is pretty empty at the 
> moment, so it's not as if it's competing with anything.
>

It's pretty empty, but IMO that's not a reason to use its "best" bindings 
for something like this.  "d" should IMO be used for "delete" (yes, I know 
it's already available with C-x 0).  See 
https://lists.gnu.org/archive/html/emacs-devel/2022-09/msg00326.html.