unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Sebastian Spaeth <Sebastian@SSpaeth.de>
To: Carl Worth <cworth@cworth.org>,
	Notmuch developer list <notmuch@notmuchmail.org>
Subject: Re: Python updates
Date: Wed, 22 Jun 2011 08:57:09 +0200	[thread overview]
Message-ID: <87d3i673qy.fsf@SSpaeth.de> (raw)
In-Reply-To: <87wrgeeu3p.fsf@yoom.home.cworth.org>

[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2011-06-22  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 10:59 Python updates Sebastian Spaeth
2011-06-16 13:58 ` Sebastian Spaeth
2011-06-21 21:46   ` Carl Worth
2011-06-22  6:57     ` Sebastian Spaeth [this message]
2011-06-22 13:58       ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3i673qy.fsf@SSpaeth.de \
    --to=sebastian@sspaeth.de \
    --cc=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).