From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pranshu sharma Newsgroups: gmane.emacs.devel Subject: Re: Add function to rotate/transpose all windows Date: Sat, 05 Oct 2024 01:10:04 +1000 Message-ID: <87zfnjlx9v.fsf@gmail.com> References: <87setpdv21.fsf@gmail.com> <86o74aa41b.fsf@gnu.org> <3d4546ac-70d9-4865-b42d-0dc50cb0f3a7@gmx.at> <878qvcgqpu.fsf@gmail.com> <0138d382-8e63-4b53-8c2c-fece826a7d0a@gmx.at> <87plooaw1w.fsf@gmail.com> <87v7yeykr0.fsf@gmail.com> <19ca7821-e034-4ae5-9ff6-570243329d74@gmx.at> <87r09224pe.fsf@gmail.com> <87ikudk62k.fsf@gmail.com> <0d879e95-c37e-416d-b439-daa6384c4f30@gmx.at> <878qv8kws2.fsf@gmail.com> <87ed4xvf60.fsf@gmail.com> <32650808-7cf9-4288-91b5-c7d78663de8f@gmx.at> <8734ldlcpk.fsf@gmail.com> <874j5s76y8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33985"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 04 17:41:29 2024 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 1swkQr-0008ct-EY for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Oct 2024 17:41:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swkQ6-00048m-O1; Fri, 04 Oct 2024 11:40:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swjwg-0007oC-Vf for emacs-devel@gnu.org; Fri, 04 Oct 2024 11:10:19 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swjwf-000256-DH; Fri, 04 Oct 2024 11:10:18 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-20b49ee353cso20519395ad.2; Fri, 04 Oct 2024 08:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728054615; x=1728659415; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=k0PDS+IOBnk0fQKYcnr59dTW1h8UVry1gGREe7RMNcI=; b=JRi+mwSXWmFwvNziU6MF6s1GH26LCl8vD3Ah+NQCVXN+41tER7IBmFOLIiqysfr0pi ajsPPsPRJAungEPMgV3sTGMY0SZjPHehFsHoJy968tY7sY6cG3T0hutBB7uglaGQPxP1 wYDw+U5G+ZjXvU7/2Dzl2jwNgUovjjjzYQxdpcOA1IOTsTS3tw8LajwgQmRn8QgTKk7l XhE3iUR+lNhHgcmAWDX8uKhP1DvALhN8ZC3WwDkkI/H/N9E/YoZnYE0v0WU5xqjk+UJY DwCQf1PpKqbylTn/7UsYiUrcpKb7g4gxoRWqyZXMwBru6566GcwQ+bS2RaS6OS7KpSVx 0opQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728054615; x=1728659415; 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 :message-id:reply-to; bh=k0PDS+IOBnk0fQKYcnr59dTW1h8UVry1gGREe7RMNcI=; b=pbGlfXUtdkRXel93OJvr62TsoCyrEHRTapifcl9x5pQkYiaszKS+53ksX/oNP85IlA +DmaLF5WRWlthCR29VATXoVTfEdxIFX/5Jg7vcga+/cMPjgktPibQJPJL/SIyDJDEBvD 2MmOGjG8RShtFm8QXBRQZn3/XWVuNLEfd133MFg2qZ8JD28gJz/muN2AdoN8FnEVbMzg /Zj7CORU7a9TDA9vILMMxZbd161+6aH47/YKgwe3r9TwI4TtZkq/xcf8A5W07HZd9jRM PAgL3pYlLAoohW2ZAJ8hTCrCHllwrnMjv0ak3zmk9F7jYilFEVCTdfquAC4YZUml7P4D tapw== X-Forwarded-Encrypted: i=1; AJvYcCWiZPLri+1XT5Vdc4yUgey9vdYr3WpF9t8BKCPVs/j4G/vgE4xZa9MTo3lnQhT0iPRysWtLnV61k0+i6Q==@gnu.org X-Gm-Message-State: AOJu0YyFt/RE+/AfcY4vUd/ntbFU1J6RoFiBqtDIF9Y6P6bXmA90VR3W UBIr3GkvLrzjF+Y1P3HAir4UR2eVXitGyJibuJgoJFqAWGGxhNGUCdOb3g== X-Google-Smtp-Source: AGHT+IGxHtdJwXBUK55Qjs2DET49e7LpbXg5bZu3JfX4AIN7nccc06/op0G8+2Iz1GauwJ/aICwnAw== X-Received: by 2002:a17:90b:3795:b0:2d8:9255:396d with SMTP id 98e67ed59e1d1-2e1e5dc6041mr3230927a91.0.1728054614528; Fri, 04 Oct 2024 08:10:14 -0700 (PDT) Original-Received: from pebl ([2001:8003:7816:8300:7044:3cd4:593c:baa8]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e1e86652edsm1717076a91.36.2024.10.04.08.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 08:10:12 -0700 (PDT) In-Reply-To: (martin rudalics's message of "Fri, 4 Oct 2024 10:08:19 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=pranshusharma366@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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-Mailman-Approved-At: Fri, 04 Oct 2024 11:40:41 -0400 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324316 Archived-At: martin rudalics writes: >> I can't comment much cuz I'm not really familiar with these functions, >> but one thing that pops out is would maintaining a dead windows table >> take up lot of resources? > > No. It's already here via the variable 'window-dead-windows-table'. I see >> Also do you think a function like 'window-rebuild-tree' would be useful, >> and it accepts the a tree like the output of window-tree-pixel-sizes. >> rn this is possible by using the following arguments for >> window--transpose-1: >> (window--transpose-1 tree-you-want (below . left) t) >> However this is not really obvious. >> >> I think it could be useful to add a wrapper with more obvious name > > You would have to tell me in more detail what 'window-rebuild-tree' > would do. Say window window-tree-pixel-sizes retruns: ((t (918 . 562) (# (442 . 562)) (# (476 . 562)))) Then if you C-x 1, and then: (window-rebuild-tree '((t (918 . 562) (# (442 . 562)) (# (476 . 562))))) It should rebuild the whole thing to the orignal > One thing 'window-tree-pixel-sizes' should then possibly do is to > include the identity of internal windows so 'window-rebuild-tree' > could resurrect them as well. idk what you mean by this, is the identity not included in window object itself, as in does refer argument not work with it? also I found that when using tabs from tab-bar-mode, calling functions like flip windows 2 times in a row will fuck up the tabs. I tested it with orignal transpose-frame.el and it does not have this problem, mayeb it is something to do with the C new patch refer argument code?