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

From: Gregory Heytings <[email-masked]>
Date: Sat, 19 Aug 2023 16:43:15 +0000

>> OK, this patch adds support for making the buffer strongly dedicated 
>> with a prefix argument, and also adds an indicator to the mode line of 
>> whether the current window is dedicated (which seems useful even if we 
>> don't apply the toggle part of this patch).
>
> Any thoughts on this patch?
>

Two thoughs:

1. I would simplify the body of toggle-window-dedicated, using

(set-window-dedicated-p window (not (window-dedicated-p)))

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).

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.