From: Pankaj Jangid <pankaj@codeisgreat.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Swap windows in a frame
Date: Mon, 10 Jan 2022 22:09:03 +0530 [thread overview]
Message-ID: <87ee5fr1eg.fsf@codeisgreat.org> (raw)
In-Reply-To: 87pmozsnqc.fsf@zoho.eu
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>>>> I have two windows in a frame. Is there a command to swap
>>>> their location?
> (defun swap-windows ()
> (interactive)
> (let ((buffer (current-buffer)))
> (other-window 1)
> (switch-to-buffer-other-window (current-buffer))
> (other-window 1)
> (switch-to-buffer buffer) ))
>
Yes. Thanks for sharing this. Pasting it to my init :-)
next prev parent reply other threads:[~2022-01-10 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 3:48 Swap windows in a frame Pankaj Jangid
2022-01-10 4:29 ` Samuel Banya
2022-01-10 5:10 ` Pankaj Jangid
2022-01-10 5:05 ` Yuri Khan
2022-01-10 6:27 ` Pankaj Jangid
2022-01-10 13:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-10 16:39 ` Pankaj Jangid [this message]
2022-01-11 23:53 ` Ergus via Users list for the GNU Emacs text editor
2022-01-12 4:54 ` Pankaj Jangid
2022-01-12 21:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ee5fr1eg.fsf@codeisgreat.org \
--to=pankaj@codeisgreat.org \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.