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, 19 Oct 2024 11:45:02 +1000 Message-ID: <87bjzgg929.fsf@gmail.com> References: <87setpdv21.fsf@gmail.com> <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> <861q0qfnhr.fsf@mail.linkov.net> <878quxdant.fsf@gmail.com> <86zfndi6wh.fsf@mail.linkov.net> <87zfncuqhu.fsf@gmail.com> <86v7y00w68.fsf@mail.linkov.net> <87y12smubh.fsf@gmail.com> <96ea5140-9043-4c1b-97f3-4c534296355e@gmx.at> <87frotqx90.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="25787"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 19 08:02:09 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 1t22XQ-0006Ww-S4 for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Oct 2024 08:02:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t22Wg-0000sx-0k; Sat, 19 Oct 2024 02:01:22 -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 1t1yWm-0003Wd-Du for emacs-devel@gnu.org; Fri, 18 Oct 2024 21:45:12 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1yWk-0007dP-Mw; Fri, 18 Oct 2024 21:45:12 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20c6f492d2dso32166205ad.0; Fri, 18 Oct 2024 18:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729302308; x=1729907108; 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=MyU1JbMVn3UBI2Vcx3V3UVB6P2GKHQr7MJeK57hv1EM=; b=lQJsqNJk4LHApbGpoVNW8xXwVgs5R5zTv4ZCE/366AdM0aQU+CVwnx6QFP6lymQ4df NXi777OKar6RR9i4SYKf4Wgts5DlB25C2RpQ9KiOUo4thA4t0kvexHKG4zIYp03cR8lo 4SMdudcIgL/2jk5NuyORpZ4YsrSCqmFE6vNopu66fmszKQWIJTcyMDthK1RapVnrytdq iRRsnXURpZV8FPixcdTWgLZ5e8XYRtmZTYo5H4VJTkau5AwxpNRxsLpAEja82yX72SFr swg6Easjk6g1ruKreUUasVeLXUbBlgbwdFhuB1jrtxLzP/d6D/IQDE+pBX4Hy5O++cqh hfEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729302308; x=1729907108; 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=MyU1JbMVn3UBI2Vcx3V3UVB6P2GKHQr7MJeK57hv1EM=; b=Msn+RMvbwRzZJ/SP8It4y19Mfwj7N4zTcIrVStoyd7Jd9gZ1Imgd+l/BINGGSRJ8Fo JoHliC9VGMGk/cQfrU5WwX4Iua4nKI9mlD2Xzzfs1LQua68ys06uY2aXnb9zt+jhM7oo J03jXdbcj7fgclTEbyqSqi4TNFPogmZKT4tJbFasLPDNua4mUHIw6FDmhu4xLYLlLJWk k/rLtMLVs2D10YjhxMaslcM1XAremeqganFQWoB0MI2hvkHsFnYGMRJbZJ58XlRX15Lr G8lq6wgOkJpQ5RS11NbGNOdhCzydw6vNVnrPiRjCKAZfGI88QOSIflzro9LTXyRVvWjy UJ3w== X-Forwarded-Encrypted: i=1; AJvYcCUUZbxQUwfMe5wfwbxkf0d7hGmyXpXDr0CMC4X10pK5M+tAYZ0gUgtVflSc9dVq4MQhRBpA@gnu.org, AJvYcCVcfJCbTj8pIBiS2unae1xWMOdXvMvA3nM/TypiXOLEVktn3KjgkOvTV29hvkeD8yjyIaOe/+dma0+x5Fg=@gnu.org X-Gm-Message-State: AOJu0YxgoAC3HXq4wOFWuaGX22zBbjNLHAgUmxVvHEMc/VIOuc+lNfg3 KFEx9F5rJ/IQy6r7JytaBQLzwhIcxfl76MYdFulFiQiCeErGPXYorj1GcVO/ X-Google-Smtp-Source: AGHT+IGRh4ptwtPnhaBWq2IMwmxB0DkQvX8lLnpFIcH2iwFh37MSQyb7JpkeNXQpT6vNGkiCxYTkwg== X-Received: by 2002:a17:902:da8f:b0:20c:6bff:fc8a with SMTP id d9443c01a7336-20e5a70d7e4mr58840175ad.2.1729302308112; Fri, 18 Oct 2024 18:45:08 -0700 (PDT) Original-Received: from pebl ([2001:8003:7816:8300:9c0e:7092:d1d1:43f8]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7eacc2081f4sm2026756a12.2.2024.10.18.18.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 18:45:07 -0700 (PDT) In-Reply-To: (martin rudalics's message of "Fri, 18 Oct 2024 19:48:41 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=pranshusharma366@gmail.com; helo=mail-pl1-x631.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: Sat, 19 Oct 2024 02:01:21 -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:324671 Archived-At: martin rudalics writes: > Note that 'flip-windows-horizontally' binds "windows" instead of > "window". And please don't cascade ifs - the appropriate Lisp idiom > here is 'cond' as in > Ah, I see > > BTW does it work if FRAME-OR-WINDOW is an internal window? In the doc > string you say that it must be a "live frame or window" but 'windowp' > returns t for internal windows too. > It works if frame-or-window is an internal window, I changed 'live' with 'valid' >> I added subtree speicfic options to the docstring(before they were not >> there), and made changes to window--transpose. However it is weird if >> you C-u M-x transpose-windows C-x z multiple times, you get weired >> result since the parent window changes, nothing I can do about that, >> just how windows work. > > If you optionally can supply REFER as a cons where the car is the > previous (currently deleted) parent and the cdr the previous (currently > deleted) leaf window (you have to keep pointers to all of them just in > case the collector runs in between), we can easily fix that. Just that > 'window-tree-pixel-sizes' would have to report the old parent window too > (in front of the flag telling whether it constitutes a horizontal or > vertical split, probably). It's easy to do, believe me. > I don't understand > > What about adding it to windmove.el? Eli or Juri will decide. > I agree with Eli it should autoloaded, but every windmove function seems to be focused on something to do with directional windows, these functions would be a bit out of place. How does a new autoloaded window-util.el sound? if you think its a good idea I can also spend some time making an ace-window like window jump function to make window-util a bit more complete. Which instead of acewin puts a letter or number in the window's modeline instead, and if you enter that letter/number you go to that window (the idea is to save letter in a window-parameter, and use that in modeline)