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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 20 Aug 2023 13:11:47 +0300

> Date: Sun, 20 Aug 2023 09:56:06 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked], [email-masked], 
>     [email-masked], [email-masked], [email-masked]
> 
> > A user who didn't customize switch-to-buffer-in-dedicated-window does 
> > not necessarily want his/her dedicated windows to be strongly dedicated 
> > by default.  Which is why one of the alternatives I suggested is to use 
> > the value of that variable as the indication which kind of dedication to 
> > use by default.
> 
> That wouldn't really work, alas.  The mapping would be:
> 
> switch-to-buffer-in-dedicated-window t => weakly dedicated
> 
> switch-to-buffer-in-dedicated-window non-t => strongly dedicated

I meant the opposite mapping, actually.

> Weakly dedicating a window when switch-to-buffer-in-dedicated-window is t 
> is not really useful.  And the default value of 
> switch-to-buffer-in-dedicated-window is nil, so the default would be 
> strongly dedicated anyway.

There's an inherent problem with using
switch-to-buffer-in-dedicated-window for this purpose anyway: it
doesn't necessarily allow switch-to-buffer to change the buffer in
such a window, it might ask the user whether to switch, and the window
is no longer dedicated if the switch takes place.

So I don't think this variable can serve the user preference for
whether the window should be strongly or weekly dedicated by default.