unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Chris Menzel <cmenzel@remove-this.tamu.edu>
Subject: Re: rotate split windows
Date: Tue, 5 Dec 2006 21:03:06 +0000 (UTC)	[thread overview]
Message-ID: <slrnenbnkd.29ql.cmenzel@philebus.tamu.edu> (raw)
In-Reply-To: 9oy7pmpsbr.fsf@gonzo.vircinity

On 05 Dec 2006 11:09:28 +0100, Marco Wahl <mw@visenso.de> said:
> Markus Triska <triska@gmx.at> writes:
>
>> Add this to your .emacs:
>> 
>> 
>> (defun rotate-split ()
>>   (interactive)
>>   (let ((root (car (window-tree))))
>> [...]
>
> Calling the function gives
>
> car: Symbol's function definition is void: window-tree
>
> Is there an alternative for
>
> $ emacs --version
> GNU Emacs 21.3.1

Give this a try:

(defun rotate-window-buffers()
  (interactive)
  (let* ((windows (window-list))
         (buffers (mapcar #'window-buffer windows))
         (wpoints (mapcar #'window-point windows))
         (w (pop windows)))
         (setq windows (append windows `(,w)))
         (mapc (lambda(w)
                 (let ((b (pop buffers))
                       (p (pop wpoints)))
                       (set-window-buffer w b)
                       (set-window-point w p)))
               windows)))

(define-key global-map [f7] 'rotate-window-buffers)

  reply	other threads:[~2006-12-05 21:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1515.1165253652.2155.help-gnu-emacs@gnu.org>
2006-12-04 19:54 ` rotate split windows Markus Triska
2006-12-05 10:09   ` Marco Wahl
2006-12-05 21:03     ` Chris Menzel [this message]
2006-12-06 18:12     ` Markus Triska
2006-12-06 21:34       ` Chris Menzel
2006-12-07  8:34       ` wim yedema
     [not found]       ` <mailman.1633.1165480499.2155.help-gnu-emacs@gnu.org>
2006-12-07 17:35         ` Markus Triska
2006-12-04 13:33 wim yedema
2006-12-04 21:22 ` Dieter Wilhelm

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=slrnenbnkd.29ql.cmenzel@philebus.tamu.edu \
    --to=cmenzel@remove-this.tamu.edu \
    /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.
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).