Subject: bug#27999: 26.0.50; delete-other-windows deletes side windows

From: Alex <[email-masked]>
Date: Mon, 07 Aug 2017 15:17:54 -0600

martin rudalics <[email-masked]> writes:

>> I tested using the following:
>>
>> (display-buffer-in-side-window (get-buffer "*Messages*") '((side .
>> left)))
>>
>> Executing "C-x 1" in Emacs 25.2 doesn't delete the *Messages* buffer,
>> but in master it does.
>
> Please read Eli's complaints in the discussion of bug#24368
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24368
>
> to understand why I made the change.  You now have to explicitly set the
> 'no-delete-other-window' parameter of a side window in order to preserve
> it from being deleted.  This parameter works for any window, BTW.
>
> I forgot to fix the doc-string of ‘delete-other-windows’ accordingly and
> hopefully did that now.  Please have a look.

Thanks, that makes it clearer.

I figure that for side windows, it would be more common to want the
previous behaviour than not. Since if someone wanted to remove all side
windows, one could use 'window-toggle-side-windows' instead, right?

In any case, it would be nice to have a better interface for enabling
(or disabling) this behaviour, rather than using 'set-window-parameter'.

I'd like to suggest an additional (preferably terse) special symbol for
the alist argument of 'display-buffer-in-side-window' that would inhibit
window deletion either by delete-other-windows, delete-window, or both.

The procedure mentions "a ‘window-parameter’ entry in ALIST", but it
doesn't mention the form it should be in. I tried a few obvious forms,
but none were applied. In any case, I believe it's still too
inconvenient to list out the relevant parameters explicitly in this way.

P.S. I believe the ‘no-delete-other-window’ parameter should instead be
‘no-delete-other-windows’, to match the plurality of
‘delete-other-windows’. I made that mistake when first trying to set the
parameter.