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.
2. If we decide to keep both, what "keep"/"fileinto" without tagged
arguments means: don't set any flags
or use global flags? I would rather ignore flags completely to keep
current "keep"/"fileinto" behavior.
This breaks backward compatibility with the previous draft and if
this is a big concern it can be addressed
in the next revision of the draft.
I think that keep/fileinto without any tagged arguments SHOULD use the
global flags. If someone wants to keep/fileinto a message without the
global flags (if any), we could allow one of the following syntaxes:
keep :flags ""; OR
keep :flags NIL; OR
keep :noflags;
I would like to hear Tim's opinion on this.
IMHO, the first works fine for me.
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).
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.
5. ":globalflags_plus" and ":globalflags_minus" names are ugly.
Suggestions are welcome.
<snip>
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.
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? 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.
----------
Other comments on reading the draft.
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? 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 [...]
I'd suggest it was just "flags :add ..." but then that might cause confusion
with "file :flags ..."
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...
(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)
Nigel