From: Pranshu Sharma <pranshusharma366@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Juri Linkov <juri@linkov.net>, Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org
Subject: Re: Add function to rotate/transpose all windows
Date: Sat, 09 Nov 2024 12:09:54 +1000 [thread overview]
Message-ID: <8734k1gnt9.fsf@gmail.com> (raw)
In-Reply-To: <51068b75-e12d-4161-9a63-8c280e8b2668@gmx.at> (martin rudalics's message of "Fri, 8 Nov 2024 16:52:22 +0100")
[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]
martin rudalics <rudalics@gmx.at> writes:
>> this idea seems pretty good, I don't see any downside to this. I'll
>> have a go at it. But will this work with your earilier magic patch that
>> would somehow automaitclly reconsutruct parent windows?
>
> It wasn't magic - so far I was not able to make it work here. In all
> approaches that work here, I have to pass a (window . parent) cons to
> 'split-window' as REFER argument. I do no exclude that one can make it
> work but it's not simple and very likely requires the normal window
> handling routines to keep an old parent for each window around.
Ah, I see. This approach definetly seems better tho, cause there is no
hidden stuff going on.
>>> Attached find my latest diffs (the documentation has not been completed
>>> yet) and window-rotate.el.
>>
>> I applied the patches, and found your think works well in most cases,
>> however it fails to work in windows of file attached
>
> I don't see that here. IIUC you can get that initial configuration via
>
> C-x 3 C-x o C-x 2 C-x 3 C-x 2 C-x 3 C-x 3
>
> and it rotates fine here. What are the contents of *foo* after
> attempting to rotate?
I attached the contents of foo, but with the simpler split of
C-x 3 C-x o C-x 3 which still has the same error
>> Wait, now that I look at it, it does not work for windows with >2
>> siblings, for example C-x 3 C-x 3 gives me 'wrong argument type' error
>
> Strange. If that happened within 'split-window' it should have been
> caught by the 'condition-case'. If it happens elsewhere, you would have
> to run it via edebug. In either case *foo* should tell how far it got.
I'll see if you can tell anything by looking at foo, otherwise I will
have to do that.
Looking at the code, you have not set the size argument yet, meaning that it
sis splitting only half and half approach.
When you do this you will see the flaw of splitting parent windows: When
you split a parent window, all the child of the window being split are
scaled equally. Emacs does not handle this properly, for example look
at the screenshot I attached, this is why I initally did not want to
split parent windows.
[-- Attachment #2: Screenshot at 2024-11-09 12-04-44.png --]
[-- Type: image/png, Size: 124246 bytes --]
[-- Attachment #3: foo --]
[-- Type: application/octet-stream, Size: 1853 bytes --]
((#<window 29>
(buffer . #<buffer *unsent wide reply to martin rudalics*>)
(parent . #<window 27>) (next) (prev . #<window 28>)
(width . 481) (height . 1014))
(#<window 28>
(buffer . #<buffer *unsent wide reply to martin rudalics*>)
(parent . #<window 27>) (next . #<window 29>)
(prev . #<window 3 on *foo*>) (width . 481) (height . 1014))
(#<window 3 on *foo*> (buffer . #<buffer *foo*>)
(parent . #<window 27>) (next . #<window 28>) (prev)
(width . 958) (height . 1014))
(#<window 27> (left . #<window 3 on *foo*>) (top) (parent)
(next . #<window 4 on *Minibuf-0*>) (prev)
(first . #<window 3 on *foo*>) (width . 1920)
(height . 1014)))
1 .. w #<window 3 on *foo*> .. n #<window 28> .. p #<window 27>
1 .. w #<window 28 on *unsent wide reply to martin rudalics*> .. n #<window 29> .. p #<window 27>
((#<window 29>
(buffer . #<buffer *unsent wide reply to martin rudalics*>)
(parent . #<window 27>) (next)
(prev . #<window 28 on *unsent wide reply to martin
rudalics*>)
(width . 481) (height . 1014))
(#<window 28 on *unsent wide reply to martin rudalics*>
(buffer . #<buffer *unsent wide reply to martin rudalics*>)
(parent . #<window 27>) (next . #<window 29>)
(prev . #<window 3 on *foo*>) (width . 481) (height . 1014))
(#<window 3 on *foo*> (buffer . #<buffer *foo*>)
(parent . #<window 27>)
(next . #<window 28 on *unsent wide reply to martin
rudalics*>)
(prev) (width . 958) (height . 1014))
(#<window 27> (left . #<window 3 on *foo*>) (top) (parent)
(next . #<window 4 on *Minibuf-0*>) (prev)
(first . #<window 3 on *foo*>) (width . 1920)
(height . 1014)))
1 .. w #<window 28 on *unsent wide reply to martin rudalics*> .. s above .. r (#<window 29> . #<window 27>)
(error REFER’s cdr must specify a deleted, former parent window)
next prev parent reply other threads:[~2024-11-09 2:09 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 13:45 Add function to rotate/transpose all windows pranshu sharma
2024-09-24 13:53 ` Eli Zaretskii
2024-09-25 8:05 ` martin rudalics
2024-09-25 8:34 ` pranshu sharma
2024-09-25 9:31 ` martin rudalics
2024-09-25 10:50 ` pranshu sharma
2024-09-25 13:53 ` martin rudalics
2024-09-25 15:31 ` pranshu sharma
2024-09-26 14:10 ` martin rudalics
2024-09-26 14:22 ` Eli Zaretskii
2024-09-27 17:29 ` martin rudalics
2024-09-28 7:52 ` pranshu sharma
2024-09-28 9:26 ` martin rudalics
2024-09-28 10:53 ` pranshu sharma
2024-09-28 14:48 ` martin rudalics
2024-09-29 7:36 ` pranshu sharma
2024-09-29 8:40 ` martin rudalics
2024-09-29 9:23 ` pranshu sharma
2024-09-29 14:48 ` martin rudalics
2024-09-30 6:29 ` pranshu sharma
2024-09-30 8:57 ` martin rudalics
2024-10-01 9:17 ` pranshu sharma
2024-10-02 9:04 ` martin rudalics
2024-10-03 7:06 ` pranshu sharma
2024-10-03 8:17 ` martin rudalics
2024-10-03 10:09 ` pranshu sharma
2024-10-03 14:18 ` martin rudalics
2024-10-04 5:50 ` pranshu sharma
2024-10-04 8:08 ` martin rudalics
2024-10-04 15:10 ` pranshu sharma
2024-10-05 14:43 ` martin rudalics
2024-10-06 2:54 ` pranshu sharma
2024-10-06 15:02 ` martin rudalics
2024-10-06 15:52 ` pranshu sharma
2024-10-07 8:33 ` martin rudalics
2024-10-07 9:42 ` pranshu sharma
2024-10-03 15:12 ` Eli Zaretskii
2024-10-08 18:35 ` Juri Linkov
2024-10-09 6:59 ` pranshu sharma
2024-10-09 16:21 ` Juri Linkov
2024-10-10 11:49 ` pranshu sharma
2024-10-10 16:57 ` Juri Linkov
2024-10-13 5:43 ` pranshu sharma
2024-10-13 8:17 ` martin rudalics
2024-10-14 17:36 ` Juri Linkov
2024-10-15 8:34 ` pranshu sharma
2024-10-15 16:16 ` Juri Linkov
2024-10-18 14:52 ` pranshu sharma
2024-10-18 17:48 ` martin rudalics
2024-10-18 18:37 ` Eli Zaretskii
2024-10-19 1:45 ` pranshu sharma
2024-10-19 6:45 ` Eli Zaretskii
2024-10-19 18:19 ` Juri Linkov
2024-10-19 8:33 ` martin rudalics
2024-10-20 8:19 ` martin rudalics
2024-10-20 14:11 ` Pranshu Sharma
2024-10-20 17:37 ` martin rudalics
2024-10-21 5:54 ` Pranshu Sharma
2024-10-21 8:14 ` martin rudalics
2024-10-21 9:23 ` martin rudalics
2024-10-21 13:37 ` Pranshu Sharma
2024-10-22 18:12 ` martin rudalics
2024-10-24 14:38 ` Pranshu Sharma
2024-10-24 18:39 ` martin rudalics
2024-10-25 14:24 ` Pranshu Sharma
2024-10-25 17:09 ` martin rudalics
2024-10-26 9:14 ` Pranshu Sharma
2024-10-27 8:23 ` martin rudalics
2024-11-02 14:06 ` Pranshu Sharma
2024-11-05 18:01 ` martin rudalics
2024-11-08 9:23 ` Pranshu Sharma
2024-11-08 10:06 ` Pranshu Sharma
2024-11-08 15:52 ` martin rudalics
2024-11-09 2:14 ` Pranshu Sharma
2024-11-09 8:48 ` martin rudalics
2024-11-08 15:52 ` martin rudalics
2024-11-09 2:09 ` Pranshu Sharma [this message]
2024-11-09 8:48 ` martin rudalics
2024-11-09 10:55 ` Pranshu Sharma
2024-11-09 18:06 ` martin rudalics
2024-11-10 10:09 ` Pranshu Sharma
2024-11-10 16:36 ` martin rudalics
2024-11-11 14:47 ` Pranshu Sharma
2024-11-11 16:55 ` martin rudalics
2024-11-12 13:50 ` Pranshu Sharma
2024-11-12 17:46 ` martin rudalics
2024-10-14 17:32 ` Juri Linkov
2024-09-28 7:58 ` pranshu sharma
2024-09-28 8:18 ` Eli Zaretskii
2024-09-28 9:40 ` martin rudalics
2024-09-28 11:35 ` Eli Zaretskii
2024-09-28 14:58 ` martin rudalics
2024-09-28 15:28 ` Eli Zaretskii
2024-10-07 8:33 ` martin rudalics
2024-09-28 13:22 ` pranshu sharma
2024-09-28 14:21 ` Eli Zaretskii
2024-09-28 14:49 ` martin rudalics
2024-09-27 10:06 ` pranshu sharma
2024-09-27 17:29 ` martin rudalics
2024-09-24 17:40 ` Petteri Hintsanen
2024-09-24 19:34 ` Charles Choi
2024-09-25 2:00 ` Emanuel Berg
2024-09-25 7:00 ` pranshu sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734k1gnt9.fsf@gmail.com \
--to=pranshusharma366@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).