
New patches:

[FocusNth improvements.
Aleksey Artamonov <aleksey.artamonov@gmail.com>**20081012094402
 
 In some cases previous version of FocusNth was not very reliable. For
 example, it's not my cup of tea to press Mod-1 to switch to the last
 window of the tag with some reflected layout. What's more I wanted
 not to switch to floating windows or to think them as the last windows
 at the tag. So the changes are intended to sort it all out.
] {
hunk ./XMonad/Actions/FocusNth.hs 17
-                 focusNth) where
+                 focusNth,
+                 focusNthExt
+                               ) where
hunk ./XMonad/Actions/FocusNth.hs 21
-import XMonad.StackSet
+import XMonad.StackSet hiding (filter)
hunk ./XMonad/Actions/FocusNth.hs 35
+-- Sometimes it is really convenient to alter the order
+-- of windows' switching or to omit some of the windows
+-- at all. To fulfill this 'focusNthExt' should be used.
+-- The following code switches to the floating windows
+-- only after all others (uses XMonad.Util.EZConfig):
+--
+-- > -- mod-[F1 .. F9]
+-- > ++
+-- > [ ("M-<F" ++ k ++ ">", do
+-- >              state <- get
+-- >              floating <- return $ W.floating (windowset state)
+-- >              focusNthExt (\x -> let (a, b) = partition (not . (flip M.member) floating) x in a ++ b)
+-- >                          (\_ -> True)
+-- >                          i)
+-- >   | (k, i) <- zip (map show [1..]) [0..8]
+-- > ]
+--
hunk ./XMonad/Actions/FocusNth.hs 57
-focusNth = windows . modify' . focusNth'
-
-focusNth' :: Int -> Stack a -> Stack a
-focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s
-                              | otherwise = listToStack n (integrate s)
+focusNth = focusNthExt (\x -> x) (\_ -> True)
hunk ./XMonad/Actions/FocusNth.hs 59
-listToStack :: Int -> [a] -> Stack a
-listToStack n l = Stack t ls rs
- where
-    (t:rs)    = drop n l
-    ls        = reverse (take n l)
+-- | Give focus to the nth window taking into consideration windows' reordering
+-- and filter functions.
+-- If reordering function changes the size of the given list no switching occures.
+focusNthExt :: ([Window] -> [Window]) -> (Window -> Bool) -> Int -> X()
+focusNthExt t f = windows . modify' . (focusNth' t f)
hunk ./XMonad/Actions/FocusNth.hs 65
+focusNth' :: ([Window] -> [Window]) -> (Window -> Bool) -> Int -> Stack Window -> Stack Window
+focusNth' transform f n s =
+    let integrated = integrate s
+        transformed = transform $ integrated
+        matching = length (filter f transformed)
+    in if (n < 0) || (n >= matching) || (length transformed /= length integrated)
+       then s
+       else listToStack n transformed f
hunk ./XMonad/Actions/FocusNth.hs 74
+listToStack :: Int -> [Window] -> (Window -> Bool) -> Stack Window
+listToStack num list f = Stack t ls rs
+    where
+      (ls, _, skipped) = foldl (\ (l, n, s) e -> case (n, f e) of
+                                                   (-1, _) -> (l, -1, s)
+                                                   (0, True) -> (l, -1, s)
+                                                   (_, True) -> (e : l, n - 1, s)
+                                                   (_, False) -> (e : l, n, s + 1))
+                         ([], num, 0) list
+      (t : rs) = drop (skipped + num) list
}

Context:

[Depend on X11 >= 1.4.3
Spencer Janssen <spencerjanssen@gmail.com>**20080921055456] 
[Actions.Search: add a few search engines
intrigeri@boum.org**20081008104033
 
 Add Debian {package, bug, tracking system} search engines, as well as Google
 Images and isohunt.
 
] 
[Implement HiddenNonEmptyWS with HiddenWS and NonEmptyWS
Joachim Breitner <mail@joachim-breitner.de>**20081006211027
 (Just to reduce code duplication)
] 
[Add straightforward HiddenWS to WSType
Joachim Breitner <mail@joachim-breitner.de>**20081006210548
 With NonEmptyWS and HiddenNonEmptyWS present, HiddenWS is obviously missing.
] 
[Merge emptyLayoutMod into redoLayout
Joachim Breitner <mail@joachim-breitner.de>**20081005190220
 This removes the emptyLayoutMod method from the LayoutModifier class, and
 change the Stack parameter to redoLayout to a Maybe Stack one. It also changes
 all affected code. This should should be a refactoring without any change in
 program behaviour.
] 
[SmartBorders even for empty layouts
Joachim Breitner <mail@joachim-breitner.de>**20081005184426
 Fixes: http://code.google.com/p/xmonad/issues/detail?id=223
] 
[Paste.hs: improve haddocks
gwern0@gmail.com**20080927150158] 
[Paste.hs: fix haddock
gwern0@gmail.com**20080927145238] 
[minor explanatory comment
daniel@wagner-home.com**20081003015919] 
[XMonad.Layout.HintedGrid: add GridRatio (--no-test because of haddock breakage)
Lukas Mai <l.mai@web.de>**20080930141715] 
[XMonad.Util.Font: UTF8 -> USE_UTF8
Lukas Mai <l.mai@web.de>**20080930140056] 
[Paste.hs: implement noModMask suggestion
gwern0@gmail.com**20080926232056] 
[fix a divide by zero error in Grid
daniel@wagner-home.com**20080926204148] 
[-DUTF8 flag with -DUSE_UTF8
gwern0@gmail.com**20080921154014] 
[XSelection.hs: use CPP to compile against utf8-string
gwern0@gmail.com**20080920151615] 
[add XMonad.Config.Azerty
Devin Mullins <me@twifkak.com>**20080924044946] 
[flip GridRatio to match convention (x/y)
Devin Mullins <me@twifkak.com>**20080922033354] 
[let Grid have a configurable aspect ratio goal
daniel@wagner-home.com**20080922010950] 
[Paste.hs: +warning about ASCII limitations
gwern0@gmail.com**20080921155038] 
[Paste.hs: shorten comment lines to under 80 columns per sjanssen
gwern0@gmail.com**20080921154950] 
[Forgot to enable historyFilter :(
Spencer Janssen <spencerjanssen@gmail.com>**20080921094254] 
[Prompt: add configurable history filters
Spencer Janssen <spencerjanssen@gmail.com>**20080921093453] 
[Update my config to use 'statusBar'
Spencer Janssen <spencerjanssen@gmail.com>**20080921063513] 
[Rename pasteKey functions to sendKey
Spencer Janssen <spencerjanssen@gmail.com>**20080921062016] 
[DynamicLog: doc fixes
Spencer Janssen <spencerjanssen@gmail.com>**20080921061314] 
[Move XMonad.Util.XPaste to XMonad.Util.Paste
Spencer Janssen <spencerjanssen@gmail.com>**20080921060947] 
[statusBar now supplies the action to toggle struts
Spencer Janssen <spencerjanssen@gmail.com>**20080918013858] 
[cleanup - use currentTag
Devin Mullins <me@twifkak.com>**20080921011159] 
[XPaste.hs: improve author info
gwern0@gmail.com**20080920152342] 
[+XMonad.Util.XPaste: a module for pasting strings to windows
gwern0@gmail.com**20080920152106] 
[UrgencyHook bug fix: cleanupUrgents should clean up reminders, too
Devin Mullins <me@twifkak.com>**20080920062117] 
[Sketch of XMonad.Config.Monad
Spencer Janssen <spencerjanssen@gmail.com>**20080917081838] 
[raiseMaster
seanmce33@gmail.com**20080912184830] 
[Add missing space between dzen command and flags
Daniel Neri <daniel.neri@sigicom.com>**20080915131009] 
[Big DynamicLog refactor.  Added statusBar, improved compositionality for dzen and xmobar
Spencer Janssen <spencerjanssen@gmail.com>**20080913205931
 Compatibility notes:
     - dzen type change
     - xmobar type change
     - dynamicLogDzen removed
     - dynamicLogXmobar removed
] 
[Take maintainership of XMonad.Prompt
Spencer Janssen <spencerjanssen@gmail.com>**20080911230442] 
[Overhaul Prompt to use a zipper for history navigation.  Fixes issue #216
Spencer Janssen <spencerjanssen@gmail.com>**20080911225940] 
[Use the new completion on tab setting
Spencer Janssen <spencerjanssen@gmail.com>**20080911085940] 
[Only start to show the completion window with more than one match
Joachim Breitner <mail@joachim-breitner.de>**20080908110129] 
[XPrompt: Add showCompletionOnTab option
Joachim Breitner <mail@joachim-breitner.de>**20080908105758
 This patch partially implements
 http://code.google.com/p/xmonad/issues/detail?id=215
 It adds a XPConfig option that, if enabled, hides the completion window
 until the user presses Tab once. Default behaviour is preserved.
 TODO: If Tab causes a unique completion, continue to hide the completion
 window.
] 
[XMonad.Actions.Plane.planeKeys: function to make easier to configure
Marco T��lio Gontijo e Silva <marcot@riseup.net>**20080714153601] 
[XMonad.Actions.Plane: removed unneeded hiding
Marco T��lio Gontijo e Silva <marcot@riseup.net>**20080714152631] 
[Improvements in documentation
Marco T��lio Gontijo e Silva <marcot@riseup.net>**20080709002425] 
[Fix haddock typos in XMonad.Config.{Desktop,Gnome,Kde}
Spencer Janssen <spencerjanssen@gmail.com>**20080911040808] 
[add clearUrgents for your keys
Devin Mullins <me@twifkak.com>**20080909055425] 
[add reminder functionality to UrgencyHook
Devin Mullins <me@twifkak.com>**20080824200548
 I'm considering rewriting remindWhen and suppressWhen as UrgencyHookModifiers, so to speak. Bleh.
] 
[TAG 0.8
Spencer Janssen <spencerjanssen@gmail.com>**20080905195420] 
Patch bundle hash:
97e4db74332c3c2c030945283ad5cc79a796901e
