From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Understanding atomic window groups
Date: Fri, 24 May 2019 14:32:18 -0700 [thread overview]
Message-ID: <875zpzedy5.fsf@ericabrahamsen.net> (raw)
In-Reply-To: f7b8d517-8ddd-ca75-d24a-0471e0f2402a@gmx.at
martin rudalics <rudalics@gmx.at> 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
overview.
Thanks,
Eric
next prev parent reply other threads:[~2019-05-24 21:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 17:50 Understanding atomic window groups Eric Abrahamsen
2019-05-23 8:39 ` martin rudalics
2019-05-23 20:14 ` Eric Abrahamsen
2019-05-24 8:01 ` martin rudalics
2019-05-24 8:24 ` Eli Zaretskii
2019-05-24 21:32 ` Eric Abrahamsen [this message]
2019-05-25 7:59 ` martin rudalics
2019-05-25 8:13 ` Eli Zaretskii
2019-06-03 9:11 ` martin rudalics
2019-06-03 15:10 ` Eli Zaretskii
2019-05-25 16:26 ` Eric Abrahamsen
2019-05-25 17:54 ` Eric Abrahamsen
2019-06-03 9:13 ` martin rudalics
2019-06-03 9:12 ` martin rudalics
2019-06-03 21:03 ` Eric Abrahamsen
2019-06-04 8:20 ` martin rudalics
2019-06-04 17:28 ` Eric Abrahamsen
2019-06-11 21:07 ` Eric Abrahamsen
2019-06-15 8:16 ` martin rudalics
2019-06-15 15:47 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zpzedy5.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.