From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Understanding atomic window groups Date: Thu, 23 May 2019 13:14:54 -0700 Message-ID: <87lfyxszb5.fsf@ericabrahamsen.net> References: <87tvdmqsxq.fsf@ericabrahamsen.net> <0a820a2c-8b37-469e-6b0e-61b126b6c7b8@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58923"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 23 22:15:43 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTu7q-000FA3-Kf for ged-emacs-devel@m.gmane.org; Thu, 23 May 2019 22:15:42 +0200 Original-Received: from localhost ([127.0.0.1]:42779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTu7p-0008BW-58 for ged-emacs-devel@m.gmane.org; Thu, 23 May 2019 16:15:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTu7F-0008AQ-E8 for emacs-devel@gnu.org; Thu, 23 May 2019 16:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTu7E-0007U6-GZ for emacs-devel@gnu.org; Thu, 23 May 2019 16:15:05 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:59556 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTu7E-0007QO-CE for emacs-devel@gnu.org; Thu, 23 May 2019 16:15:04 -0400 Original-Received: from localhost (50-251-205-17-static.hfc.comcastbusiness.net [50.251.205.17]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 9F5BAFA022; Thu, 23 May 2019 20:14:55 +0000 (UTC) In-Reply-To: <0a820a2c-8b37-469e-6b0e-61b126b6c7b8@gmx.at> (martin rudalics's message of "Thu, 23 May 2019 10:39:18 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236950 Archived-At: 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