Little more lisp help =)
- From: Brian <oldminer gmail com>
- To: sawfish-list gnome org
- Subject: Little more lisp help =)
- Date: Thu, 10 Feb 2005 18:00:29 -0700
On Thu, 10 Feb 2005 03:27:16 +0000, dataangel <k04jg02 kzoo edu> wrote:
<<snip>>
> This time I'm trying to modify the jump-or-exec code (it's on the wiki
<<snip>>
>
> (mapc (lambda (gWin)
> (display-window gWin))
> (filter filterGroupPred (windows-in-group wind)))
>
> This code doesn't work :/ filterGroupPred is passed to the function that
> runs this code, and I've tested it with (lambda (w) (`t)) as
> filterGroupPred and it still doesn't work. What am I missing?
Greetings,
I must admit, even after reading the code you're working from
(available at http://sawfish.uberstyle.net/uploads/SawfishWiki/jump-or-exec.jl),
I still lack a "big picture" of what you're doing exactly. Just the
same...
You might want to test your code a bit with sawfish-client.
Considering I'm not terribly great with Lisp, I find it's a good way
to avoid having to see if I'm on the right track. I tried the code
you provided and received:
user> ((lambda(w) ('t)) 'something)
*** Invalid function: t"
You'll want to omit the extra parens around 't. Then it will be
the closure you're after.
Otherwise, it appears right to me. I tested:
user> (define (ic_filter filter_func)
(mapc (lambda(w) (iconify-window w))
(filter filter_func (managed-windows))))
user> (define (play-filter w) (string-match "Play" (window-name w)))
user> (ic_filter #'play-filter)
()
And all of XMMS disappeared. So it looks like the code you posted
was correct.
(Sending to the list this time instead of accidentally responding privately.)
HTH.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]