[PATCH 1/9] python: add a .gitignore file and refine the toplevel one

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Sep 30 02:14:31 PDT 2011


On Fri, 30 Sep 2011 02:41:02 +0200, Justus Winter <4winter at informatik.uni-hamburg.de> wrote:
Non-text part: multipart/mixed
> Quoting Sebastian Spaeth (2011-09-29 09:45:38)
> >Also, not all "status" are an error, e.g. DuplicateMessageId denotes
> >success rather than failure, it just communicates a status.
> 
> I just stumbled upon the following comment in notmuch.h:
> 
> /* Status codes used for the return values of most functions.
>  *
>  * A zero value (NOTMUCH_STATUS_SUCCESS) indicates that the function
>  * completed without error. Any other value indicates an error as
>  * follows:
> [...]

That sounds like notmuch.h doesn't know what it wants :-). The "error"
can occur on add_message or remove_message and notmuch.h has to say:

on add_message:
 * If 'message' is not NULL, then, on successful return
 * (NOTMUCH_STATUS_SUCCESS or NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) '*message'
 * will be initialized to a message object that can be used for things
 * such as adding tags to the just-added message. The user should call
 * notmuch_message_destroy when done with the message. ... On any failure
 * '*message' will be set to NULL.

So DUPLICATE_MESSAGE_ID is definitely a successful return here, filling in the
Message object.

on remove_message:
 * NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: This filename was removed but
 *	the message persists in the database with at least one other
 *	filename.

Similarly, the operation succeeded, it's just that there are other
messages with that ID still around. One could argue whether this is an
error or not.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110930/0b50e98e/attachment.pgp>


More information about the notmuch mailing list