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: Add function to rotate/transpose all windows Date: Tue, 24 Sep 2024 23:45:42 +1000 Message-ID: <87setpdv21.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="40947"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 15:51:24 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 1st5wo-000ARm-Ks for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 15:51:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st5wX-000729-V8; Tue, 24 Sep 2024 09:51:09 -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 1st5rg-0004mr-4U for emacs-devel@gnu.org; Tue, 24 Sep 2024 09:46:04 -0400 Original-Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1st5rS-0008Rw-Uk for emacs-devel@gnu.org; Tue, 24 Sep 2024 09:45:53 -0400 Original-Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-277f0540c3aso2851512fac.3 for ; Tue, 24 Sep 2024 06:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727185547; x=1727790347; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=1aoPtuhUIEt8LnGQwKMrQKezbWsKDCOoQ1hIxO5xlYE=; b=avEpx7GkSo8oGgV6L53Cgx8sVd1y48JQi70w+rTKJSy4Dt+iMkpPuh2NXuvAOQN4Gq qy0Z14m6CqOR61nHhFm5O1re3n2xwv43VmgoKt1cmnoaGqD26d/RV8fiICaW+pBOMoLo fLvqbrKMBI8G3QYox9I6KaXZxBccChh8Qr4TOt8fubabwRIv7rAJ6EMw+NZJGIJpYdqa lILHEUg+TgZk97Tu2OD7Laja+DnycnCKoUvqKzh3zdOzNhcuZ7EvHof7BiOTuNBe+omU Nhk31SV9dpGKhsj85wS9Ss7L2gVBw/erFiKLZW6XHBIiKbu7qJNeSbIYhNT7woep0L/M BiZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727185547; x=1727790347; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1aoPtuhUIEt8LnGQwKMrQKezbWsKDCOoQ1hIxO5xlYE=; b=Knbel80r+ryCzBbtYKLKnhhyQ5r0rO6pFZdzN3Mx5j64Cx9zSkp6kvQjU0blbNbOsY Y0YMJi12H6TUzRByVEc6asI4GIXrZiG10Io2SEfTE3GB+TrE4/u/dk1mngzCReAHjTij anrph9Vxx8/awOU1B+vCdkhNO5gvzshMgNBEuHV2iQSEgF/ISdpBQx3faxqRpYTj/80G 6IhHP/mVWdkXrfPbhG+dvzUpAW1DzIRiDImYAf7d07311yqZ0mYxF7SkEB4GBE7GTvwi XMlr0mbdU8FF8Yy+oxvHHiyC4VV0VAnfkLvCfiyhwSQx+s1Lhxq/iXrjmFl1tczYRmXH iZ7A== X-Gm-Message-State: AOJu0Yxrda4jMRGuvy+WH4ERt8LP1Pm333Ox4uBU/Y/M4uFzP44aAhB8 x1f/pLdVDhxBgp5LhFB2DEqyKIlScUFsJg6mGrzAHDne9UAjo19YJ4TA/w== X-Google-Smtp-Source: AGHT+IGQV5CwMsjGfA6hVfA01jZtWJsa1Sue5fp52/6y2rCvDNWKRjYEUI+DzKkLnGoLgbjqImQjCw== X-Received: by 2002:a05:6870:56a6:b0:260:f43e:7d89 with SMTP id 586e51a60fabf-2803ce9a9cfmr9352335fac.2.1727185547155; Tue, 24 Sep 2024 06:45:47 -0700 (PDT) Original-Received: from pebl ([2001:8003:7816:8300:2beb:5cbc:399f:335a]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6b7c76316sm1180627a12.65.2024.09.24.06.45.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2024 06:45:46 -0700 (PDT) Received-SPF: pass client-ip=2001:4860:4864:20::34; envelope-from=pranshusharma366@gmail.com; helo=mail-oa1-x34.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: Tue, 24 Sep 2024 09:50:58 -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:324036 Archived-At: An useful for function for C-x w map is to add a function to rotate windows. What I mean by this is basiclly rebuilt the window tree, but do vertical split where a horizonal, and vice versa. For example if we rotate the the frame with the windows A B C: - | A | B | | A | | - |-------| - > |---| C | - | C | | B | | I think this is extremly useful, as sometimes for example I open a window with a horizontal split, and the lines are rather long, then I have to manually toggle the window split to vertical. An example of this: https://www.emacswiki.org/emacs/TransposeFrame The code in this has the following limitations: - Does not work in emacs 29.1 - No good way to transpose only specific parts of window tree