ietf-mta-filters
[Top] [All Lists]

Re: draft-melnikov-sieve-imapflags-04.txt

2000-10-31 14:41:02
I am going on holidays, so reply today or wait for my response till my return 
in 2 weeks.

Nigel Swinson wrote:

   1. Do we want to use special actions that work with global state or 
use optional tagged arguments?
      Allow both? Currently the draft allows both models.

As stated earlier (in response to Tim's post) I'm in favor of both.

Me too.
Any other voices?
I think so too.

Great.

Given that setting IMAP flags is kinda a non-destructive operation, then I 
think we should use the globalflags by default on keep and fileinto.  Then I 
recon one of the following should allow us to file messages with no flags.

keep :flags NIL
keep :flags ""
keep :flags "None"
keep :flags []

The [] is kinda already handled with the list processing, "" will give us a 
null flag name which will give us the same kind of thing as an empty list, 
but NIL is the most readable (although perhaps only for coders who are used 
to Nils and Nulls).

I would rather not introducing new language construction like NIL. :flags "" or 
:flags [] are fine with me.

NIL might however be a bit more annoying to parse as up till now we only 
excepted a " or [ next after :flags, but readablility should be quite a high 
goal as it's hopefully not just going to be coders who will want to write 
SIEVE.  I'm not all that keen on :noflags given that one of the above options 
works fine.  The less syntax or arguments the better.

At the moment I vote we adopt :flags [] and :flags "None" and where we find 
something like :flags "" or :flags ["","","None"] then we can default to no 
flags.

:flags "None" will be confusing, because you can define IMAP flag "None" (name 
is meaningless, but nevertheless)

2. The same results can be obtained using existing mechanisms.
Examples:

keep :globalflags;              =       keep;   (see point 2. above)
keep :globalflags_plus "foo";   =       addflag "foo"; keep; removeflag 
"foo";
keep :globalflags_minus "foo";  =       removeflag "foo"; keep; addflag 
"foo";

Although it is mathematically equivalent, it is not very convenient :-).

Actually are they equivalent?  Suppose foo is not already set in the second 
example and we remove the unset flag.  using removeflag.  We will then have 
altered the global flags by the set of calls.

I guess you are right. I wasn't very attentive.

It was suggested earlier that we have:

keep :globalflags+ [...]  - stored flags are global flags with additional 
flags
keep :globalflags- [...]  - stored flags are global flags with some removed
keep :globalflags   - use only global flags, the default
keep :flags [...]   - stored flags are only those listed - global flags are 
ignored

I quite liked this set of syntax.  What was wrong with it?  Are + and - 
annoying characters?

The problem is that SIEVE grammar doesn't allow '+' or '-' in a name of tagged 
argument.

 If they are I'd go for:

keep :globalflags :plus [...]
keep :globalflags :minus [...]

Which might even be better than :globalflags+ and definately better than 
:globalflags_plus.

In this case it is better to have ":globalflags plus [...]" or ":globalflags 
minus [...]" (no colon in front of plus/minus), because it is confusing (tagged 
argument that requires another argument, hrrrrr ).

3. Actions
<snip>
 The "setflag" action replaces the existing set of flags with a new set.

I would expect a setflag to operate on just the one flag though.  Should this 
be called setflags, setflagsto or resetflags to describe more the fact that 
you aren't just setting a flag, but blanking all previously set flags?

This is the intent. Can you suggest better wording?

 removeflag and addflag don't seem to confuse me as much though as they 
'update' the existing set of flags.  Or we could have:

globalflags :add [...] - Add the named flags
globalflags :remove [...] - Remove the named flags
globalflags :reset - Remove all set flags
globalflags :setto [...] - Remove all set flags and set to the named flags, 
equivalent to :reset then :add [...]

"globalflags :reset" is equivalent to "globalflags :setto []".

Although I don't mind your proposal, I would like to see strong support from 
people to change the syntax.

I'd suggest it was just "flags :add ..." but then that might cause confusion 
with "file :flags ..."

Yep.

I suppose the :setto could be remove to simplify the syntax, but might work 
quite well as a convenience, it also leaves neat room to add more stuff on 
globalflags in the future.  I quite like this, I think it reads better.

------------

"keep :globalflags;" Now seems like a strange statement.  It looks like you 
are keeping global flags, not keeping a message using the global flags.   I 
suppose "keepmessage :globalflags;" would be clearer but I guess it's too far 
down the line to change something like this...

You probably don't want to change base SIEVE spec before last call :-).

(By the way, the link on the http://www.cyrusoft.com/sieve/ page that points 
to 
http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-03.txt 
doesn't work.)

Comments welcomed, flames expected.... :o)

Thanks for feedback.

Alexey



<Prev in Thread] Current Thread [Next in Thread>