Nested if then else in categorize.cfg

Joachim Breitner mail at joachim-breitner.de
Tue Jan 7 15:44:06 CET 2014


Hi Rich,

Am Dienstag, den 07.01.2014, 13:39 +0000 schrieb Richard Case:

> I'm new to this so bear with me but I'm trying to do a rule like this
> for Firefox using arbtt v0.7:
> 
> -- Firefox
> current window ($program == "Navigator") ==>
>   if $title =~ /^(.*) - (.*@.*) - .* Mail - Mozilla Firefox$/ then tag
> Email:$2-$1 else
>   if $title =~ /^(.*) - Calendar - Mozilla Firefox$/ then tag
> Calendar:$1 else
>   if $title =~ /^(.*) - Mozilla Firefox$/ then tag Firefox:$1 else tag
> Firefox,
> 
> 
> But I get:
> Parser error:
> "/home/rich/.arbtt/categorize.cfg" (line 29, column 3):
> unexpected "i"
> expecting "else"
> 
> 
> 
> If looks to be correct according to the syntax rules; am I doing
> something wrong or is this a bug?

thanks for bringing this up. This is a bug, and my proposed fix also
uncovers a bug. See my answer on SE:
http://stackoverflow.com/a/20973950/946226

And also thanks for posting on Stackexchange; we are now present there
with our very own arbtt-tag:
http://stackoverflow.com/questions/tagged/arbtt

I’ll be happy to answer more arbtt-questions there.

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.nomeata.de/pipermail/arbtt/attachments/20140107/05ea98a5/attachment.asc>


More information about the arbtt mailing list