[Patch V4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Hi > Here is the latest version of this patch set. I think I have fixed most > of the problems raised in review but there are some remaining issues > detailed below. I know this patch set needs rebasing on top of Jani's notmuch-show command line parsing patch: should I do that now or wait for Jani's patch to be accepted? But in response to id:"878vk943ci.fsf at servo.finestructure.net" I think the first three patches which add the --no-exclude option (the three patches are for the C code, the man pages and the tests) are self contained so could go in without the rest of the series. They are much smaller and simpler than the rest so should be relatively easy to review, they seem to apply to current master and they are not affected by Jani's patch as notmuch-show does not look at search_exclude_tags currently. Best wishes Mark
Re: [Patch V4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Hi Here is the latest version of this patch set. I think I have fixed most of the problems raised in review but there are some remaining issues detailed below. I know this patch set needs rebasing on top of Jani's notmuch-show command line parsing patch: should I do that now or wait for Jani's patch to be accepted? But in response to id:878vk943ci@servo.finestructure.net I think the first three patches which add the --no-exclude option (the three patches are for the C code, the man pages and the tests) are self contained so could go in without the rest of the series. They are much smaller and simpler than the rest so should be relatively easy to review, they seem to apply to current master and they are not affected by Jani's patch as notmuch-show does not look at search_exclude_tags currently. Best wishes Mark ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[Patch V4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Here is the latest version of this patch set. I think I have fixed most of the problems raised in review but there are some remaining issues detailed below. Changes and queries: 1) Changed --do-not-exclude option to --no-exclude 2) The api notmuch_query_set_omit_excluded_messages remains: without it I can't see how a user can pass the notmuch_messages_t object around which does not contain the excluded messages. See id:"87fweusabh.fsf at qmul.ac.uk" 3) I have introduced a new function notmuch_thread_get_flag_messages (notmuch_thread_t *thread, unsigned int flag_mask, unsigned int flags) which returns the number of messages with the specified flags on flag_mask. (Note the current NOTMUCH_MESSAGE_FLAGs were nominally the bit position of the flag rather than the actual bit of the flag. I changed that. I am not completely happy with the style for this commit (patch 7/11): any comments gratefully received! 4) In id:"20120131044352.GZ17991 at mit.edu" Austin suggested that I use a notmuch_mset_messages_t object rather than an notmuch_doc_id_set_t. I couldn't see how that would work unless the iterator would generate the excludes in step with the main query. At the moment the doc_id object just stores a bitmap listing all relevant excluded messages. 5) If we have a query which overrides the excludes such as "blah and tag:deleted" should the tag:deleted messages still be marked excluded? The current implementation does mark them excluded but my preference would be not to. What do people think? 6) In id:"20120131050748.GA10844 at mit.edu" Austin pointed out that the sort will be influenced by the excluded messages. I do not think either of us are sure whether it should be or not so I have left it as is for the moment. Best wishes Mark
[Patch V4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
Here is the latest version of this patch set. I think I have fixed most of the problems raised in review but there are some remaining issues detailed below. Changes and queries: 1) Changed --do-not-exclude option to --no-exclude 2) The api notmuch_query_set_omit_excluded_messages remains: without it I can't see how a user can pass the notmuch_messages_t object around which does not contain the excluded messages. See id:87fweusabh@qmul.ac.uk 3) I have introduced a new function notmuch_thread_get_flag_messages (notmuch_thread_t *thread, unsigned int flag_mask, unsigned int flags) which returns the number of messages with the specified flags on flag_mask. (Note the current NOTMUCH_MESSAGE_FLAGs were nominally the bit position of the flag rather than the actual bit of the flag. I changed that. I am not completely happy with the style for this commit (patch 7/11): any comments gratefully received! 4) In id:20120131044352.gz17...@mit.edu Austin suggested that I use a notmuch_mset_messages_t object rather than an notmuch_doc_id_set_t. I couldn't see how that would work unless the iterator would generate the excludes in step with the main query. At the moment the doc_id object just stores a bitmap listing all relevant excluded messages. 5) If we have a query which overrides the excludes such as blah and tag:deleted should the tag:deleted messages still be marked excluded? The current implementation does mark them excluded but my preference would be not to. What do people think? 6) In id:20120131050748.ga10...@mit.edu Austin pointed out that the sort will be influenced by the excluded messages. I do not think either of us are sure whether it should be or not so I have left it as is for the moment. Best wishes Mark ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch