From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Menzel Newsgroups: gmane.emacs.help Subject: Re: rotate split windows Date: Tue, 5 Dec 2006 21:03:06 +0000 (UTC) Organization: Texas A&M University Message-ID: References: <87u00bl9mq.fsf@gmx.at> <9oy7pmpsbr.fsf@gonzo.vircinity> Reply-To: cmenzel@remove-this.tamu.edu NNTP-Posting-Host: dough.gmane.org X-Trace: sea.gmane.org 1165362095 26372 80.91.229.10 (5 Dec 2006 23:41:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Dec 2006 23:41:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 06 00:41:33 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Grjum-0008Kz-K7 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Dec 2006 00:41:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Grjum-0001ga-3K for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Dec 2006 18:41:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!news.tamu.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: philebus.tamu.edu Original-X-Trace: news.tamu.edu 1165352586 25577 128.194.75.11 (5 Dec 2006 21:03:06 GMT) Original-X-Complaints-To: abuse@tamu.edu Original-NNTP-Posting-Date: Tue, 5 Dec 2006 21:03:06 +0000 (UTC) User-Agent: slrn/0.9.8.1 (FreeBSD) Original-Xref: shelby.stanford.edu gnu.emacs.help:143671 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39273 Archived-At: On 05 Dec 2006 11:09:28 +0100, Marco Wahl said: > Markus Triska 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)