[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding atomic window groups

From: Eric Abrahamsen
Subject: Re: Understanding atomic window groups
Date: Fri, 24 May 2019 14:32:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> Oh I see, thanks. I thought I had to check for the 'window-atom
>> parameter on the parent, if there was a parent.
> Atomic windows can be arbitrarily nested so checking for atomicity of
> the parent alone is in general not sufficient.

That's nuts! In a good way. Thanks for the information.

>>> 'quit-window' does not necessarily restore to a state that invalidates
>>> the atomicity of the containing group.  'delete-window' OTOH may do
>>> that, so if 'quit-window' deletes all windows of an atomic group but
>>> one, that atomic group is dissolved automatically.
>> Hmm, maybe it was `delete-window' that raised the error:
>> delete-window: Root of atomic window is root window of its frame
>> Whereas `quit-window' behaves in a way I can't quite pin down -- it
>> killed the buffer in one case but not in another, didn't change the
>> actual window layout, and moved point to the "first" of the atomic
>> windows.
> 'quit-window' calls 'window-deletable-p' before it tries to delete a
> window so it should never cause a "Root of atomic window is root
> window of its frame" error.  If it does cause an error we have a bug
> so maybe check again.

No, it was `delete-window' that raised the error, as you describe below.
`quit-window' just behaved unpredictably.

> 'delete-window' OTOH will raise an error when the root of the atomic
> window is the root of the frame.  If you want to avoid that, typically
> because most of your users who type C-x 0 expect the selected window
> to disppear or those typing C-x 1 expect the selected window to become
> the single window of its frame despite of atomicity, you will have to
> adjust the behavior with the help of 'delete-window' and
> 'delete-other-windows' parameters for all involved windows.

This is really helpful, and I see that the docstring of `delete-window'
actually mentions the case of atomic windows. I agree with Eli that
maybe more documentation is in order. I feel like all the pieces are
present (here and there), but there's no one place to get a full


reply via email to

[Prev in Thread] Current Thread [Next in Thread]