[Xmonad] darcs patch: TwoPane: Fix syntax error in example

Alex Tarkovsky alextarkovsky at gmail.com
Fri Oct 12 22:34:48 EDT 2007


Spencer Janssen wrote:
> On Friday 12 October 2007 20:50:12 Alex Tarkovsky wrote:
>> That extra comma will cause strife to noobs. ;)
> 
> Applied, just five minutes late for the RC :).  Are you automatically testing
> all the usage examples with your Config generator?  It'd be great to have a
> comprehensive report on the usage for each contrib module.

generate-configs.sh can indeed be tweaked to insert all example usage
docstrings uncommented and the compile process would do the rest,
catching errors like the above for you. (Of course you'd still have to
follow any instructions for manual setup first; for example with
ManageDocks, you'd have to manually comment out competing Config.hs
definitions for manageHook. I suppose this too could be automated, but
it'll complicate the current docstring scheme somewhat.)

You can accomplish this by changing these lines:

INS_PREFIX_DEF="-- "
INS_PREFIX_IMPORT="--import "
INS_PREFIX_KEYBIND="-- "
INS_PREFIX_KEYBINDLIST="-- "
INS_PREFIX_LAYOUT="-- "
INS_PREFIX_MOUSEBIND="-- "

to the following:

INS_PREFIX_DEF=""
INS_PREFIX_IMPORT="import "
INS_PREFIX_KEYBIND=""
INS_PREFIX_KEYBINDLIST=""
INS_PREFIX_LAYOUT=""
INS_PREFIX_MOUSEBIND=""

I could add a commandline parameter, say --uncommented or maybe --raw,
and a corresponding new mode to the script that will handle commented
and uncommented insertions automatically, if that's what you had in mind.

-- 
Alex Tarkovsky


More information about the Xmonad mailing list