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: Sun, 01 Dec 2024 14:13:56 +1000 Message-ID: <874j3oca63.fsf@gmail.com> References: <87setpdv21.fsf@gmail.com> <878qthewbq.fsf@gmail.com> <8599bc67-b05d-4afc-8e6e-1ba64a30054e@gmx.at> <87frnp2x85.fsf@gmail.com> <823c7cca-63d4-4568-94bc-11f5949d6c5c@gmx.at> <87h683muss.fsf@gmail.com> <02432e6c-6ee2-4c68-9ebb-246f6be88918@gmx.at> <877c8wadke.fsf@gmail.com> <878qt8spp2.fsf@gmail.com> <0ce35c7a-8b28-4905-a6ab-caf50f2fc750@gmx.at> <87mshl2i6h.fsf@gmail.com> <9b460366-f34e-48f6-a680-e7fa5bc7f598@gmx.at> <87bjy03fql.fsf@gmail.com> <356d63bc-818c-428c-b31b-a0eb227b3a8a@gmx.at> <87o720gjst.fsf@gmail.com> <7dfe87a0-b367-47df-86df-f8fd95163fd6@gmx.at> <8734jbz8sb.fsf@gmail.com> <50ab6c0a-6afb-4727-9094-178668fc4f4e@gmx.at> <87mshgbpte.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="787"; 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 Sun Dec 01 06:46:01 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 1tHcmP-00005I-9I for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Dec 2024 06:46:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHcla-0000s4-LX; Sun, 01 Dec 2024 00:45:10 -0500 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 1tHbLT-00025S-QI for emacs-devel@gnu.org; Sat, 30 Nov 2024 23:14:07 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHbLR-0006me-BR; Sat, 30 Nov 2024 23:14:06 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7251abe0e69so2632613b3a.0; Sat, 30 Nov 2024 20:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733026443; x=1733631243; 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=f4Hh5mVm8ZxP7AQgIQHP4bGE6lAvNrNb6fD9Prp8SCA=; b=PZBufqmUbhXCWCkMBcuyBGeKHzUIItpaf3tTy8eKrfeepQD5nwQahJHZ9+6zHcVuQZ zjCLPGkhqpfE0VTespRZswARCcA8AjZ2JiNKVWHc+7UPy02ZkVO3NIMV6aOtv3HKFkVQ 0NKLvNVA0lp6OcqB5y14Maubpc6h0SyAUE05IRngv7jxqG2Hf+M2PJdepfJ3FmugCrJm 2fcKS5CR7xH4G0q1ez5PT56KXRWXwh21682+jqsT8Cz7zENE1SpwXJ12Qsp5Th0Kpqn1 NEtmR7YMpxbHMi34MyhbWWpUgPTszRs0/V8xeD5FfWvtpLQ5FzGcWl8ft4mo0CAtekXt Qw/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733026443; x=1733631243; 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=f4Hh5mVm8ZxP7AQgIQHP4bGE6lAvNrNb6fD9Prp8SCA=; b=Ar3JiskiEhmWezLuT+eK782vPZsvZICJMeaHcQGNM5dcDQhlDLRe9TUBHPg3FG3YwS IVvMc8dg6Eq1ORKBEvbIupo5nYcespfmeD+qwjTCYM45KPPEa2MgIPalTUHidBEx3Wnc 8tLDgjddyZojE1jFBGXMZa38+wQLFN4eqNR3yeay3iTr8LGMFr7y6peo/btn4FATZcFy UhaS5zm28fOUTJfHaztGKadBGQkuN7DyDGI3Z2P+uWeyyWZTyT6prVZHseYgmngnslhl jb3T/FOQ70+qgb5ttgEPchyKo3zi+/bc6yIqW6fJzRyrbohl8DmUGxt4/QgMhe67pYVi tGTQ== X-Forwarded-Encrypted: i=1; AJvYcCVpRiOf/vUFu/XiWDxiGcB6Z943u2s9mJv+yc3AQPkI9fk7T7MPClAfD1X5GVxbu/HRi85cFa+c6YALT5s=@gnu.org, AJvYcCXU3h5fz7FMGk68jG9R+lmH3+9TIHUG8qCnTqoPXwjHhhb60UiFm6vBl808W5aNLUg6xcN4@gnu.org X-Gm-Message-State: AOJu0YxlCTAQ8HRBrOSsK2/11NTymAcmUJRaWXQMjBqCvHsWYTUpij+e esowL259DBTSRJwtRupYVf9mIxNHt+6FQxXuO79cKfiHrdFGlNx3lDSuP0rK X-Gm-Gg: ASbGnctBPkjRPwUBTroulDg6H8/jLlrhSSpMAM7ohEY1S52BGYjEodHZcEr5FfZZJrJ Jygy3cZ+LJ31VbGf071+ESmAX+H/nbbd7OGqP6jjJ21wzN+r1IbtOeJQ+3VLuP+CR+geCzteT9M GIOOBjUAvT5gChKMvKJdss6EGdJIX6GgRc8zyTL5+EcBd7UuOssyY9M0zYCKa0/oL8m5UAEktJi 92fbFO/fA8z0A9rff5ZprfQfrnS+qwMXtLzVKk7RukuoJKPUXB3tA== X-Google-Smtp-Source: AGHT+IEXnN5TP6ja7DX5bLp0iALaOyHpkcuA9FT51pJvnovdEUT71xtEfaEXSTVSvGyiXzmIImfPcg== X-Received: by 2002:a17:902:f545:b0:215:6337:25da with SMTP id d9443c01a7336-21563372637mr60280395ad.39.1733026441043; Sat, 30 Nov 2024 20:14:01 -0800 (PST) Original-Received: from pebl ([2001:8003:7816:8300:ace6:d955:2ded:457c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215219ac6afsm53252455ad.241.2024.11.30.20.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2024 20:14:00 -0800 (PST) In-Reply-To: (martin rudalics's message of "Sat, 30 Nov 2024 20:01:09 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=pranshusharma366@gmail.com; helo=mail-pf1-x430.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: Sun, 01 Dec 2024 00:45:06 -0500 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:325898 Archived-At: martin rudalics writes: > > Hmmm... It doesn't call 'window-swap-states'. OTOH you're right - the > windows must be swapped too. It's like rotating but the window layout > remains visually unchanged. > Think of it like a based version of other-window, where instead of going to the other windows you stay where you are but get the other windows to readjust. It's easier to understand the function if you think of it as it uses window-swap-states, but what it does is that is destroyes the windows, and rebuilds then with window--transpose-1 to avoid the problems you described with window-swap-states. The reason it was called cycle windows is because to it, windows are a circular linear list instead of a tree, and simply cycles that list. rotate-window-layout would be a better name as RMS suggested I just added support for cycling in revese direction, I'll send src when I reply to other email(soon, just need to do docstrings).