unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: Understanding atomic window groups
Date: Thu, 23 May 2019 13:14:54 -0700	[thread overview]
Message-ID: <87lfyxszb5.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <0a820a2c-8b37-469e-6b0e-61b126b6c7b8@gmx.at> (martin rudalics's message of "Thu, 23 May 2019 10:39:18 +0200")


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	other threads:[~2019-05-23 20:14 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 [this message]
2019-05-24  8:01     ` martin rudalics
2019-05-24  8:24       ` Eli Zaretskii
2019-05-24 21:32       ` Eric Abrahamsen
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfyxszb5.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).