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

From: Gregory Heytings <[email-masked]>
Date: Sun, 20 Aug 2023 21:56:45 +0000

>
> I didn't know about switch-to-buffer-in-dedicated-window.  It does 
> resolve the basic annoyance I described, of C-x b not working.
>

Great!

>
> But, it affects all windows, not just ones that have been interactively 
> dedicated by the user.
>

Indeed, that option is used for C-x b in all dedicated windows.

>
> I personally have just set switch-to-buffer-in-dedicated-window to 
> `pop', so that C-x b works when I happen to be in a window which was 
> made strongly dedicated by a Lisp program.  But for windows which I 
> interactively choose to dedicate with toggle-window-dedicated, I think 
> I'd prefer the `t' behavior.  Which is effectively what we have now by 
> weakly dedicating the window.
>

It is wise to go into such refinements for a new command that, as Eli 
says, is a bit borderline?  Right now window dedication is not even 
mentioned in the Emacs manual.  Perhaps a new value for 
switch-to-buffer-in-dedicated-window, which would prompt the user and 
offer them the choice to either display the buffer in the current window 
or in another window, would be enough (and more generally useful)?