[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] group-format-map and window-format-map
From: |
Ben Spencer |
Subject: |
Re: [STUMP] group-format-map and window-format-map |
Date: |
Mon, 30 May 2011 12:03:42 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Matt,
On Thu, May 26, 2011 at 08:29:58PM -0700, Matt Spear wrote:
> 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.
- (mapcar 'prin1-to-string
- (mapcar 'window-number
- (group-windows
(current-group))))))))
+ (mapcar 'window-map-number
+ (group-windows (current-group)))))))
I've noticed that this still needs a conversion to string to avoid
breaking completion. So again, could either do this in
window-map-number/group-map-number (I'm leaning towards this), or
something like:
(mapcar (lambda (g) (princ-to-string
(window-map-number g)))
(group-windows (current-group)))))))
+ (let ((win (find n (group-windows (current-group))
+ :test #'string=
+ :key (lambda (w) (princ-to-string (window-map-number
w))))))
+ (if win
+ (window-number win)
+ (throw 'error "No Such Window."))))))
Minor point: this can be more succinctly expressed as:
(or (find n (group-windows (current-group))
:test #'string=
:key (lambda (w) (princ-to-string (window-map-number w))))
(throw 'error "No Such Window.")))))
Ben