Re: Python updates
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 22 Jun 2011 06:57:09 +0000 (08:57 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:40 +0000 (09:38 -0800)
bc/f05b0169b091dc77e911593e58de62749377d3 [new file with mode: 0644]

diff --git a/bc/f05b0169b091dc77e911593e58de62749377d3 b/bc/f05b0169b091dc77e911593e58de62749377d3
new file mode 100644 (file)
index 0000000..c8f8165
--- /dev/null
@@ -0,0 +1,136 @@
+Return-Path: <Sebastian@SSpaeth.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 2F89F429E28\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 23:57:16 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.09\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.09 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_NONE=-0.0001, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id nZiM6tx+vaqF for <notmuch@notmuchmail.org>;\r
+       Tue, 21 Jun 2011 23:57:14 -0700 (PDT)\r
+Received: from homiemail-a12.g.dreamhost.com (caiajhbdcbbj.dreamhost.com\r
+       [208.97.132.119])\r
+       by olra.theworths.org (Postfix) with ESMTP id E3B45431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 23:57:13 -0700 (PDT)\r
+Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1])\r
+       by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 3B18471406A;\r
+       Tue, 21 Jun 2011 23:57:13 -0700 (PDT)\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:subject\r
+       :in-reply-to:references:date:message-id:mime-version:\r
+       content-type; q=dns; s=sspaeth.de; b=l2dIcst8MIV76ejm7DcC0+POnWz\r
+       EUbQuRRZxzjOPT8EJbUfvQtqAEfXaIyunvLhIUrl9gSE6wir73lXwbd5soRpAq0F\r
+       NyklfmKjC7o24aDJQKF8OdKCiMhJ5Mld0RiW64Zxc7JGO9nqrBEZe2j1Pn2Nt9Cl\r
+       npnhPwojzl/r3ewM=\r
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to\r
+       :subject:in-reply-to:references:date:message-id:mime-version:\r
+       content-type; s=sspaeth.de; bh=4q098LxpJlQ6/6QCApTzPLAcGhI=; b=W\r
+       Zq30lEaE+Y45uLvJtA1mEneslLQWLDLnybdRiFqZW+fhrhoNlNKdFqJo2chgAdYD\r
+       O2DFOxz4GSTH3wecJv0cdP47KlDbv42t3V6AzOkJ4CR6C4UfW9EZRvc+1AmvQUWd\r
+       axy5c9i7E0ylGNr8ue5z911Spa/3cXogsnR1qiw/UI=\r
+Received: from spaetzbook.sspaeth.de (mtec-hg-docking-1-dhcp-253.ethz.ch\r
+       [129.132.133.253])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       (Authenticated sender: fax@sspaeth.de)\r
+       by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPSA id B248071406B; \r
+       Tue, 21 Jun 2011 23:57:11 -0700 (PDT)\r
+Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation);\r
+       Wed, 22 Jun 2011 08:57:09 +0200\r
+From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+To: Carl Worth <cworth@cworth.org>,\r
+       Notmuch developer list <notmuch@notmuchmail.org>\r
+Subject: Re: Python updates\r
+In-Reply-To: <87wrgeeu3p.fsf@yoom.home.cworth.org>\r
+References: <87k4cmavoc.fsf@SSpaeth.de> <8739j9yj1s.fsf@SSpaeth.de>\r
+       <87wrgeeu3p.fsf@yoom.home.cworth.org>\r
+User-Agent: Notmuch/0.5-233-gb404931 (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 22 Jun 2011 08:57:09 +0200\r
+Message-ID: <87d3i673qy.fsf@SSpaeth.de>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 22 Jun 2011 06:57:16 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, 21 Jun 2011 14:46:02 -0700, Carl Worth wrote:\r
+Non-text part: multipart/signed\r
+> On Thu, 16 Jun 2011 15:58:39 +0200, Sebastian Spaeth wrote:\r
+> > Message().maildir_flags_to_tags and tags_to_maildir_flags, which are now\r
+> > by default invoked on Database().add_message and on any operation that\r
+> > modifies notmuch tags. See the updated API docs at:\r
+>=20\r
+> I'm not a fan of the above.\r
+\r
+Hi Carl,\r
+\r
+I see your point. I was approached with this by someone very\r
+confused that tagging via notmuch binary would automatically move mails\r
+between cur/new folders while tagging via python would do nothing of\r
+this sort.\r
+\r
+The automatic tag/flag synchronization can be disabled via a command\r
+line option already now, it is just enabled by default. The behavior is\r
+of course documented in the python API docs. It would be no problem, to\r
+disable the syncing by default to achieve API consistency. (and allow\r
+people to turn it on, if they wish to do so explicitly)\r
+\r
+> If we should fix Database().add_message to automatically call\r
+> maildir_flags_to_tags, then we should also fix\r
+> notmuch_database_add_message to do the same thing.\r
+\r
+=20\r
+> I can't see any good justification for behavior like this to be\r
+> different depending on the language being used to access the library.\r
+\r
+See above, people don't consider using the libnotmuch API, they "tag" a\r
+message via python and it behaves differently than "tag" a message via\r
+notmuch binary....\r
+So we'll have some level of inconsistency in any case. :)\r
+\r
+> Please consider changing things to match the semantics of the underlying\r
+> library.\r
+\r
+Would you be happy to have maildir syncing disabled by default and users\r
+can enable it via a parameter? I do see why you want to achieve\r
+consistency with the API. On the other hand are the python API somewhat\r
+more highlevel than the low-level API calls, and we provide a few\r
+convenience functions that are not available in the API at all.\r
+\r
+I can do away with it and force people to invoke the syncing manually,\r
+if you feel strongly about this. I don't have a problem with either way.\r
+\r
+Sebastian\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk4BkkUACgkQVYX1jMgnoGLNcQCeIR/HaOkg9yEwudMdCcYpYa6D\r
+wgUAoIpJ4o+dMZv/nrLVZf8OLJyO03sv\r
+=vsqH\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r