[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] fill window numbers
From: |
Shawn Betts |
Subject: |
Re: [RP] fill window numbers |
Date: |
Wed Jul 16 12:13:28 2003 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Joe Corneli <address@hidden> writes:
> Hi, here is a simple enhancement request, maybe this feature is already
> extant:
>
> I'd like a command that would renumber the windows so that there were no
> more gaps. Eg. after running this command instead of windows numbered
> 2, 3, 4, I would have windows numbered 1, 2, 3.
Here ya go:
(require 'cl)
(require 'ratpoison-cmd)
(defun ratpoison-nogaps ()
(let ((wins (mapcar 'string-to-number (split-string (ratpoison-windows
"%n")))))
(loop for n in wins
for i from 1 to (length wins)
do (ratpoison-number i n))))
Run genrpbindings in contrib/ and load the ratpoison-cmd.el file (you
may have to custo the ratpoison-program variable) before you run the
above function.
Shawn