From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: master 6a2ee981c3: Add new functions for splitting the root window Date: Fri, 16 Sep 2022 17:03:11 +0200 Message-ID: <87r10b4b0w.fsf@gmail.com> References: <166240424802.11417.12502552895310232639@vcs2.savannah.gnu.org> <20220905185728.838CEC0088A@vcs2.savannah.gnu.org> <86h71kseiw.fsf@mail.linkov.net> <87illzmjew.fsf@gnus.org> <868rmvxdvj.fsf@mail.linkov.net> <87bkrq5bmb.fsf@gnus.org> <87pmg69ifi.fsf@gmail.com> <87h71i3vr3.fsf@gnus.org> <864jxfghcf.fsf@mail.linkov.net> <87sfkygokp.fsf@gnus.org> <87r10hg5u7.fsf@melete.silentflame.com> <87v8pp3y1f.fsf@gmail.com> <84acc36e7edde6dee845@heytings.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , Sean Whitton , Lars Ingebrigtsen , Juri Linkov , Robert Pluim , emacs-devel@gnu.org, Hugo Heagren To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 16 17:07:57 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZCwf-00064q-97 for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Sep 2022 17:07:57 +0200 Original-Received: from localhost ([::1]:47078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZCwe-0001Ue-Aq for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Sep 2022 11:07:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZCs9-0006or-OA for emacs-devel@gnu.org; Fri, 16 Sep 2022 11:03:17 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:35772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZCs8-0003CE-2Y for emacs-devel@gnu.org; Fri, 16 Sep 2022 11:03:17 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id go34so50066393ejc.2 for ; Fri, 16 Sep 2022 08:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date; bh=BEE1FWqopv13xPIFkrNKHRUUE/ijNhZ/dIJsH7SyWKo=; b=TcPE5dpHdnMzkPiPYtpJWQdk6c0AYAxH/KKHlAjkiXScQqeE8juvp9fUx7spgfRsdN zcuzPsbk7rI9QWgzqs3ExF1PJkT7E7TxOHPN8BiA+HpiDS1CsUp+UtbjEfotoNmIbx0M SQtsw3fvfPMP7CR6rrcm1o+40ZSkthIp9bvkAHLXQL8m1pdXZhGZpA0QdvRaGTy5kHD2 y4i8lD/3p3Bz4SFtr8KxXaJPW1ewQfw4e3W8E9EsCgtA9iVB2u2RJegYfByfZIIBjey9 Owo8hC0KbfT9FUfJ09QOu4qbFADpohTxMEg7FdRtUbeUfnJy2CUr2O8IAD3gqAcqCN/m 7JLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=BEE1FWqopv13xPIFkrNKHRUUE/ijNhZ/dIJsH7SyWKo=; b=s4/LLOkuhvIyQ6FTPvPTON+OrYUw26ly8kkPzM+qYH9zIc/SVdo3beP0kfZygVNxWp gYiGPuy/6Azf014YAapJjODFKqmwJsGepocjYgie7wETmPPRT5bbNcZg6Vq7BigN5LEe aXH0ZeIL8Q2Pgm5FCeXmK/nMPuchMVvBJnC6W6F6GKBi2IVyRCFAR1gVqjezUH8bI2uh 9DFPhcCCGVBxcJz0SNXwS1Z7Z82+3CdcN794P7YUj54w/SPavBM4HIr/u6hdw7oCL57L 7VSE5/TzzI5miD+ePWlH+Iw9sCZEw2c3GkmxeTbW7m5dzuzG4x48I1lA2EC0wdmBfDsA SY+Q== X-Gm-Message-State: ACrzQf3vLi9JhbwX6uajI5uEiTMoEW3w86YOvZvS9RltksYnpurIcQ0I KA6wukbi1sxXSRkEKQ9Kt5w= X-Google-Smtp-Source: AMsMyM5uWApy/F4X+N1pFMUFGolQYPoPcKzEeFFsZS13oRKJPxm4m8PjqzaitTigVotFUe2k6/S9Fw== X-Received: by 2002:a17:906:58c9:b0:778:8c85:19ee with SMTP id e9-20020a17090658c900b007788c8519eemr3761549ejs.693.1663340593976; Fri, 16 Sep 2022 08:03:13 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::8510]) by smtp.gmail.com with ESMTPSA id t12-20020a1709063e4c00b00741383c1c5bsm10488316eji.196.2022.09.16.08.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 08:03:12 -0700 (PDT) In-Reply-To: <84acc36e7edde6dee845@heytings.org> (Gregory Heytings's message of "Fri, 16 Sep 2022 14:30:03 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295474 Archived-At: On Fri, 16 Sep 2022 at 14:30, Gregory Heytings wrote: >> >> Since you mention various custom repeatable commands, I think we're >> missing a less drastic version of delete-other-windows which deletes >> all siblings in the window configuration tree of the selected >> window. >> >> In other words, the non-root-window version on C-x 1. >> > > Is this what you have in mind? > > (defun delete-other-windows-soft (&optional arg) > (interactive "P") > (if arg > (delete-other-windows) > (let* ((w (window-child (window-parent))) (wl (list w))) > (while (setq w (window-next-sibling w)) (push w wl)) > (dolist (w wl) > (when (and (not (eq w (selected-window))) > (not (window-parameter w 'no-delete-other-windows))) > (ignore-errors (delete-window w))))))) Yes. I can't comment on the completeness with respect to various window parameters like 'no-delete-other-windows, but this works for me. (I guess I'd call it `delete-window-siblings` or something in that direction.)