[PATCH] lib: Improve documentation of _notmuch_message_create_for_message_id
authorAustin Clements <amdragon@MIT.EDU>
Tue, 5 Aug 2014 01:29:16 +0000 (21:29 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:05 +0000 (10:04 -0800)
cb/55a52e8165611befe95eff835a8d38b6889947 [new file with mode: 0644]

diff --git a/cb/55a52e8165611befe95eff835a8d38b6889947 b/cb/55a52e8165611befe95eff835a8d38b6889947
new file mode 100644 (file)
index 0000000..ef6edd2
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <amdragon@mit.edu>\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 E68D1431FBC\r
+       for <notmuch@notmuchmail.org>; Mon,  4 Aug 2014 18:29:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 u95Uhu29PoSj for <notmuch@notmuchmail.org>;\r
+       Mon,  4 Aug 2014 18:29:29 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
+       [18.7.68.35])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6D30B431FAE\r
+       for <notmuch@notmuchmail.org>; Mon,  4 Aug 2014 18:29:29 -0700 (PDT)\r
+X-AuditID: 12074423-f79bf6d000007580-18-53e033770a6d\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 70.32.30080.77330E35; Mon,  4 Aug 2014 21:29:27 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s751TP3a013118; \r
+       Mon, 4 Aug 2014 21:29:25 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s751TNGC000592\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 4 Aug 2014 21:29:25 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1XETZ5-00011k-EF; Mon, 04 Aug 2014 21:29:23 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] lib: Improve documentation of\r
+       _notmuch_message_create_for_message_id\r
+Date: Mon,  4 Aug 2014 21:29:16 -0400\r
+Message-Id: <1407202156-3909-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 2.0.0\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsUixCmqrVtu/CDYYOIjHYvrN2cyOzB6PFt1\r
+       izmAMYrLJiU1J7MstUjfLoErY+ns+8wFE7grGtvaWRsYz3J0MXJySAiYSNw9+5MNwhaTuHBv\r
+       PZgtJDCbSWLncf4uRi4gewOjxP3+dywQzm0miafX2xghnLmMEtveL2YCaWET0JDYtn85I4gt\r
+       IiAtsfPubNYuRg4OZgE1iT9dKiBhYYFQidaf78BKWARUJVrXTmABsXkF7CVmPpzGBHGFnETD\r
+       jU9sExh5FzAyrGKUTcmt0s1NzMwpTk3WLU5OzMtLLdI108vNLNFLTSndxAgKAnYX5R2Mfw4q\r
+       HWIU4GBU4uEVULsfLMSaWFZcmXuIUZKDSUmUN1TvQbAQX1J+SmVGYnFGfFFpTmrxIUYJDmYl\r
+       Ed58QaAcb0piZVVqUT5MSpqDRUmc9621VbCQQHpiSWp2ampBahFMVoaDQ0mC97AhUKNgUWp6\r
+       akVaZk4JQpqJgxNkOA/QcDYjkOHFBYm5xZnpEPlTjIpS4rweIM0CIImM0jy4XliUvmIUB3pF\r
+       mJcbpJ0HGOFw3a+ABjMBDTbTuQ8yuCQRISXVwBi7/ampmNlB7rNX3t0u2/JtXdU0tqzWTdc8\r
+       pz7aONNw94m7j4rfXv214lS20KvDB08cn+PM+uR3raGj8FbOf56275/uvV+z52dG85HXrHcd\r
+       Tjn9c390uL702CHGLRfTZstH9Fxbe7Zz5n819Zmz5bjlXziGHA2u8n3/5naJ/4mo3d0Lc+QT\r
+       b+uIKbEUZyQaajEXFScCAFjCvOStAgAA\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: Tue, 05 Aug 2014 01:29:36 -0000\r
+\r
+Clarify the state of the returned message when\r
+_notmuch_message_create_for_message_id returns\r
+NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND.\r
+---\r
+ lib/message.cc | 8 +++++---\r
+ 1 file changed, 5 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/lib/message.cc b/lib/message.cc\r
+index 8b17843..f8b346f 100644\r
+--- a/lib/message.cc\r
++++ b/lib/message.cc\r
+@@ -193,14 +193,16 @@ _notmuch_message_create (const void *talloc_owner,\r
+  *     There is already a document with message ID 'message_id' in the\r
+  *     database. The returned message can be used to query/modify the\r
+  *     document.\r
++ *\r
+  *   NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND:\r
+  *\r
+  *     No document with 'message_id' exists in the database. The\r
+  *     returned message contains a newly created document (not yet\r
+  *     added to the database) and a document ID that is known not to\r
+- *     exist in the database. The caller can modify the message, and a\r
+- *     call to _notmuch_message_sync will add * the document to the\r
+- *     database.\r
++ *     exist in the database.  This message is "blank"; that is, it\r
++ *     contains only a message ID and no other metadata. The caller\r
++ *     can modify the message, and a call to _notmuch_message_sync\r
++ *     will add the document to the database.\r
+  *\r
+  * If an error occurs, this function will return NULL and *status\r
+  * will be set as appropriate. (The status pointer argument must\r
+-- \r
+2.0.0\r
+\r