stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] group-format-map and window-format-map


From: Matt Spear
Subject: Re: [STUMP] group-format-map and window-format-map
Date: Thu, 26 May 2011 20:29:58 -0700

Sorry for the extreme delay, a mixture of many things came up.  I've
finally gotten the correct logic into the window-number type.  I kept
the window-map-number returning the elt, I'm not sure which is better.

Thanks for the help!!!
Matt Spear
address@hidden



On Sun, Apr 3, 2011 at 5:15 AM, Ben Spencer <address@hidden> wrote:
> Hi Matt,
>
> On Mon, Mar 28, 2011 at 09:12:04PM -0700, Matt Spear wrote:
>> Got it.  Changed window-number type to take the element of the
>> window-number-map and return the index (this requires no changes to
>> select-window-by-number).
>
> Note that this means that select-window-by-number will take different
> values when called as a function than when used interactively.  Maybe
> this makes sense though, as *window-number-map* is a high-level UI
> feature and in code you'd probably want to use the real numbers.
>
>
>> +      (let ((indx (position (elt n 0) *window-number-map*)))
>
> This only works when *window-number-map* consists of characters, and
> it doesn't work at all for non-mapped window numbers (ie ones that are
> higher than *window-number-map goes).  I think it would be preferable
> for this to work more like the :group code does, using find and
> window-map-number across (group-windows (current-group)).  Something
> like (untested):
>
> (find n (group-windows (current-group))
>      :test #'string=
>      :key (lambda (w) (princ-to-string (window-map-number w))))
>
> Then grab the real window-number of the result, if any.
>
> (side note: maybe window-map-number and group-map-number should always
> return strings so we don't have to keep printing them).
>
>
> Ben
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>

Attachment: window-map.3.patch
Description: Text Data


reply via email to

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