On Tue, 21 Jun 2011 14:46:02 -0700, Carl Worth wrote: Non-text part: multipart/signed > On Thu, 16 Jun 2011 15:58:39 +0200, Sebastian Spaeth wrote: > > Message().maildir_flags_to_tags and tags_to_maildir_flags, which are now > > by default invoked on Database().add_message and on any operation that > > modifies notmuch tags. See the updated API docs at: > > I'm not a fan of the above. Hi Carl, I see your point. I was approached with this by someone very confused that tagging via notmuch binary would automatically move mails between cur/new folders while tagging via python would do nothing of this sort. The automatic tag/flag synchronization can be disabled via a command line option already now, it is just enabled by default. The behavior is of course documented in the python API docs. It would be no problem, to disable the syncing by default to achieve API consistency. (and allow people to turn it on, if they wish to do so explicitly) > If we should fix Database().add_message to automatically call > maildir_flags_to_tags, then we should also fix > notmuch_database_add_message to do the same thing. > I can't see any good justification for behavior like this to be > different depending on the language being used to access the library. See above, people don't consider using the libnotmuch API, they "tag" a message via python and it behaves differently than "tag" a message via notmuch binary.... So we'll have some level of inconsistency in any case. :) > Please consider changing things to match the semantics of the underlying > library. Would you be happy to have maildir syncing disabled by default and users can enable it via a parameter? I do see why you want to achieve consistency with the API. On the other hand are the python API somewhat more highlevel than the low-level API calls, and we provide a few convenience functions that are not available in the API at all. I can do away with it and force people to invoke the syncing manually, if you feel strongly about this. I don't have a problem with either way. Sebastian