[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Include buffer-move.el
From: |
Leo |
Subject: |
Re: Include buffer-move.el |
Date: |
Wed, 15 Aug 2007 11:23:43 +0100 |
User-agent: |
Gnus/5.110007 Emacs/23.0.0 (20070727) Fedora 7 (gnu/linux) |
On 2007-08-15 08:01 +0100, Mathias Dahl wrote:
>> I think we should indeed add this functionality to windmove.el.
>
> A similar function was discussed a while ago in gnu.emacs.help
> (subject "rotate split windows") and a simple solution developed:
>
> http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/5197a0895413ee6c/443d6b1f25e0c585?lnk=gst&q=rotate+buffer&rnum=2#443d6b1f25e0c585
>
> The difference is that the buffers are rotated, so you cannot do
> exactly what buffer-move seems to do. I thought I should mention it
> however in case people like that better.
I copied the code here for convenience.
(defun rotate-window-buffers ()
(interactive)
(let* ((ws (window-list))
(bs (mapcar 'window-buffer ws))
(ps (mapcar 'window-point ws))
(w (pop ws)))
(dolist (v (append ws `(,w)))
(set-window-buffer v (pop bs))
(set-window-point v (pop ps)))))
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
Gnus is one component of the Emacs operating system.
- Re: Include buffer-move.el, (continued)
- Re: Include buffer-move.el, Glenn Morris, 2007/08/14
- Re: Include buffer-move.el, Juri Linkov, 2007/08/14
- Re: Include buffer-move.el, Lennart Borgman (gmail), 2007/08/14
- Re: Include buffer-move.el, Juri Linkov, 2007/08/15
- Re: Include buffer-move.el, Andreas Schwab, 2007/08/15
- Re: Include buffer-move.el, Lennart Borgman (gmail), 2007/08/15
- Re: Include buffer-move.el, David Kastrup, 2007/08/15
- Re: Include buffer-move.el, Davis Herring, 2007/08/15
Re: Include buffer-move.el, Eli Zaretskii, 2007/08/14
Re: Include buffer-move.el, Lucas Bonnet, 2007/08/15
Re: Include buffer-move.el, Leo, 2007/08/16