-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 27.03.2011 16:27, Anurag Priyam wrote:
> Hi,
> 
> The possibility to add an exception to a rule (over, adding multiple
> rules) was discussed on the user mailing list here[1]. This patch is
> just an outcome of that; tested on my machine.

Could you please test patches before sending them? Thanks.
And don't tell me you did test this, because to make it break you just have to
open any window, e.g. start a terminal with the default config:

W: awesome: luaA_dofunction:108: error while running function
stack traceback:
        [C]: in function 'pairs'
        ...e/psychon/projects/awesome/build/lib/awful/rules.lua:97: in function 
'match'
        ...e/psychon/projects/awesome/build/lib/awful/rules.lua:138: in function
<...e/psychon/projects/awesome/build/lib/awful/rules.lua:134>
error: ...e/psychon/projects/awesome/build/lib/awful/rules.lua:97: bad argument
#1 to 'pairs' (table expected, got nil)

This will happen on every rule which doesn't specify a rule_no, because of this
code (match is called with 'nil' as its second argument):

if  (entry.rule and match(c, entry.rule) and not match(c, entry.rule_no)) or

The first thing that match() does is calling pairs() on its second argument and
pairs(nil) results in the lua error I pasted above.


Now for the actual name: Why "rule_no"? What is a "rule_number"? :-P

I'd propose a name which actually explains what this does, e.g. "except",
"ignore", "skip".

Cheers,
Uli

- -- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBCAAGBQJNj01tAAoJECLkKOvLj8sGWWsIAK9OT7JOphCyqd/+pGW9ob2m
d+wHhxGPwgMXp7OFQJVWMqWCH6zmXwb60xWsvG32qs/WTHNcDXlEVmW15gbjKRTc
9iIxBGLJN5ZJrymgp+T5wszuuAZJ8cOjQjjJ0NkfIhl1g9cXfbJQ7wURVJzOUW4e
B1nonGyUsPiFNG/wUBhAkJZFYhpMiHlqbmctN2+u4+J0j77pY4jqWlh/UXFjIfAo
nFz/Yn3cYZmRvUpLin8vl2W4TVhV6CeVkGY0dWv/GMp86zsptqu0jo9E6F54ykoY
ttDyeOlpk25CrwbBzhWsY8I3nPK1IkQz3SVtTCrKdQHaTqOld7jFkD01IdbcQQc=
=vmtS
-----END PGP SIGNATURE-----

-- 
To unsubscribe, send mail to [email protected].

Reply via email to