ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] persistence of window numbers?


From: Joe Corneli
Subject: Re: [RP] persistence of window numbers?
Date: Thu, 24 Feb 2005 12:11:04 -0600

   > (mapcar 'string-to-number (split-string (ratpoison-windows "%n")))
   > ;=> (2 5)
   > 
   > (ratpoison-number 1 5)
   > ;=> ""
   > 
   > (mapcar 'string-to-number (split-string (ratpoison-windows "%n")))
   > ;=> (1 5)
   > 
   > 
   > But wait a second, I thought I just changed window 5 to be window 1.
   > 
   > number N TARGET
   >      Set a window's number to N. If another window occupies the
   >      requested number already, then the windows' numbers are swapped.
   > 
   >      The second argument, TARGET, is optional. It should be the number
   >      of the window whose number will be changed. If TARGET is omitted
   >      ratpoison defaults to the current window.
   > 
   > Why wasn't the return value of the last function call (1 2) instead of
   > (1 5)?
   > 
   > Note that if I switch to window 5 and run (ratpoison-number 1) there,
   > things work as expected.

   I think you have the parameters the wrong way round.

Well, I'm following what it says in the documentation -- it says if I
want to change window number 5 to be window number 1, then window 5 is
the TARGET and I should run

 number 1 5

because 1 is the "N" I want for this window

Even if the documentation had it backwards

 (ratpoison-number 1 5)

wouldn't mean anything when the windows were numbered 2 and 5.

And moreover,

 (ratpoison-number 6 2)

would not have the effect of changing window number 2 to be window
number 6 in this situation.  (But that is what it does.)

Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]