jmc
jmc copied to clipboard
#unaction does not work for regexp actions
Steps to reproduce:
#act {/[\d+]/}{test}; #act; #unact {/[\d+]/}; #act
probably there's a bug around "/" escaping
It's related to TinTin legacy feature of 'bulk/wildcard unaction', e.g. #unact {*axe*}
removes all actions that contain 'axe' substring.
This feature requires some method of escaping asterisk, and uses backslash for this purpose, thus first argument of act
and unact
has somewhat different syntax (in act
asterisk and backslash are just asterisk and backslash, without special meaning).
In your case #unact {/[\\d+]/}
should work, I think.
I agree that this syntax difference is counter intuitive, but I am not sure that it should be fixed, because 'fix' will brake backward compatibility (if there is someone who use this feature with mass-removing actions). And I think there are many other places with such logic in TinTin's legacy.
I think main problem here is the lack of the documentation for the very basic stuff like this. Otherwise I'm ok about keeping it as it is now