emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 23 May 2019 13:14:54 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On 05/23/19 10:39 AM, martin rudalics wrote:
>> Is that the way it's supposed to work?
>
> +     (when-let ((parent (window-parent (selected-window))))
> +       (when (window-parameter parent 'window-atom)
>
> I don't know the precise semantics of 'when-let' but I think you
> should use
>
> (when (window-parameter nil 'window-atom)
>   (let ((root (window-atom-root)))
>
> and then 'walk-window-subtree' from root.  Otherwise, that's the way
> to dissolve an atomic group of windows.

Oh I see, thanks. I thought I had to check for the 'window-atom
parameter on the parent, if there was a parent.

>> I guess I would have thought
>> there would be an easier way of getting rid of an atomic
>> configuration -- like `quit-window' in any of the windows would quit all
>> of them, or something like that. Instead, `quit-window' seems to just
>> signal an error.
>
> '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.

Anyway, I'm not going to worry about it -- manually removing the
'window-atom parameter works fine, and any other solution would likely
involve deeper changes to Gnus' windowing than I want to fool with. This
setup is clean, anyway.

Thanks,
Eric



reply via email to

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