RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread Justus Winter
Thanks for your feedback. I've updated the patch series accordingly. We need to discuss where those kind of macro definitions abstracting away compiler differences should go. None of the files in util includes notmuch-private.h, so I was unsure whether it's okay to put them there. Justus

[PATCH 4/5] Annotate internal_error with the attribute noreturn

2012-09-24 Thread Justus Winter
Annotating functions that do not return with the noreturn attribute (which is understood by both gcc and clang) prevents static analyzers from generating false positives (internal_error is used to terminate the process and is used extensively in error handling code paths). Remove the return

[PATCH 1/5] RFC: Provide a __has_attribute compatibility macro

2012-09-24 Thread Justus Winter
__has_attribute is defined by clang and tests whether a given function attribute is supported by clang. Add a compatibility macro for other compilers. Note: This is work in progress, please don't merge this patch. The question that needs to be discussed is where this kind of macro should be

[PATCH 5/5] Avoid potentially dereferencing a NULL pointer

2012-09-24 Thread Justus Winter
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers gracefully, but the G_OBJECT_TYPE used in the error handling block dereferences it without checking it first. Fix this by checking whether parent-part is valid. Found using the clang static analyzer. Signed-off-by: Justus Winter

[PATCH 3/5] Fix the COERCE_STATUS macro

2012-09-24 Thread Justus Winter
Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de ---

[PATCH 2/5] RFC: Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE

2012-09-24 Thread Justus Winter
This attribute is understood by gcc since version 2.5. clang provides support for testing for function attributes using __has_attribute. For other compilers this macro evaluates to the empty string. Note: This is work in progress, please don't merge this patch. The question that needs to be

Re: Bug#688609: notmuch: Can't deal with compressed maildir files

2012-09-24 Thread David Bremner
Joerg Jaspert jo...@debian.org writes: another wishlist going upstream. Would be nice if notmuch can be told that the mailfiles are compressed (gzip in this case), or even better - detect that itself. And then transparently deal with it. Dear Joerg; This wish is already known upstream, and

Re: RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread David Bremner
Justus Winter 4win...@informatik.uni-hamburg.de writes: We need to discuss where those kind of macro definitions abstracting away compiler differences should go. None of the files in util includes notmuch-private.h, so I was unsure whether it's okay to put them there. How about a new header

Re: [PATCH] Run `notmuch-show-hook' after setting `header-line-format'

2012-09-24 Thread Tomi Ollila
On Mon, Sep 17 2012, Damien Cassou damien.cas...@gmail.com wrote: This patch makes it possible for notmuch-show hooks to change the header line. Signed-off-by: Damien Cassou damien.cas...@gmail.com --- LGTM. Tomi emacs/notmuch-show.el |6 +++--- 1 file changed, 3 insertions(+), 3

Re: RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread Justus Winter
Quoting David Bremner (2012-09-24 12:44:04) Justus Winter 4win...@informatik.uni-hamburg.de writes: We need to discuss where those kind of macro definitions abstracting away compiler differences should go. None of the files in util includes notmuch-private.h, so I was unsure whether it's

Re: [PATCH 2/2] Avoid potentially dereferencing a NULL pointer

2012-09-24 Thread Justus Winter
Quoting Austin Clements (2012-09-22 18:19:08) Quoth Justus Winter on Sep 21 at 2:50 pm: GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers gracefully, but the G_OBJECT_TYPE used in the error handling block dereferences it without checking it first. Fix this by checking

Re: RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread David Bremner
Justus Winter 4win...@informatik.uni-hamburg.de writes: The util stuff is lower level than lib/ so it makes sense to me to put common stuff there. Maybe we should add this file to compat? Sure, given appropriate re-wording of compat/README d ___

Re: [PATCH 0/5] Notmuch Pick (WIP or contrib)

2012-09-24 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes: The code is not of the same standard as mainline code: in particular a lot of the code is written by me and is working but unidiomatic lisp. It has also not had widespread testing so I would expect it to have several bugs. I have gotten the

[PATCH 5/6] Annotate internal_error with the attribute noreturn

2012-09-24 Thread Justus Winter
Annotating functions that do not return with the noreturn attribute (which is understood by both gcc and clang) prevents static analyzers from generating false positives (internal_error is used to terminate the process and is used extensively in error handling code paths). Remove the return

[PATCH 1/6] Provide a __has_attribute compatibility macro

2012-09-24 Thread Justus Winter
__has_attribute is defined by clang and tests whether a given function attribute is supported by clang. Add a compatibility macro for other compilers. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- compat/function-attributes.h | 31 +++ 1 file

[PATCH 3/6] Extend compat/README

2012-09-24 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- compat/README |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compat/README b/compat/README index 38e2e14..12aacf4 100644 --- a/compat/README +++ b/compat/README @@ -1,6 +1,6 @@ notmuch/compat -This

[PATCH 4/6] Fix the COERCE_STATUS macro

2012-09-24 Thread Justus Winter
Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de ---

[PATCH 6/6] Avoid potentially dereferencing a NULL pointer

2012-09-24 Thread Justus Winter
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers gracefully, but the G_OBJECT_TYPE used in the error handling block dereferences it without checking it first. Fix this by checking whether parent-part is valid. Found using the clang static analyzer. Signed-off-by: Justus Winter

[PATCH 2/6] Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE

2012-09-24 Thread Justus Winter
This attribute is understood by gcc since version 2.5. clang provides support for testing for function attributes using __has_attribute. For other compilers this macro evaluates to the empty string. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- compat/function-attributes.h |

Re: [PATCH 4/6] Fix the COERCE_STATUS macro

2012-09-24 Thread Austin Clements
Quoth Justus Winter on Sep 24 at 5:21 pm: Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus

RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread Justus Winter
Thanks for your feedback. I've updated the patch series accordingly. We need to discuss where those kind of macro definitions abstracting away compiler differences should go. None of the files in util includes notmuch-private.h, so I was unsure whether it's okay to put them there. Justus

[PATCH 4/5] Annotate internal_error with the attribute noreturn

2012-09-24 Thread Justus Winter
Annotating functions that do not return with the noreturn attribute (which is understood by both gcc and clang) prevents static analyzers from generating false positives (internal_error is used to terminate the process and is used extensively in error handling code paths). Remove the return

[PATCH 1/5] RFC: Provide a __has_attribute compatibility macro

2012-09-24 Thread Justus Winter
__has_attribute is defined by clang and tests whether a given function attribute is supported by clang. Add a compatibility macro for other compilers. Note: This is work in progress, please don't merge this patch. The question that needs to be discussed is where this kind of macro should be

[PATCH 3/5] Fix the COERCE_STATUS macro

2012-09-24 Thread Justus Winter
Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de> ---

[PATCH 2/5] RFC: Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE

2012-09-24 Thread Justus Winter
This attribute is understood by gcc since version 2.5. clang provides support for testing for function attributes using __has_attribute. For other compilers this macro evaluates to the empty string. Note: This is work in progress, please don't merge this patch. The question that needs to be

[PATCH] Run `notmuch-show-hook' after setting `header-line-format'

2012-09-24 Thread Tomi Ollila
On Mon, Sep 17 2012, Damien Cassou wrote: > This patch makes it possible for notmuch-show hooks to change the > header line. > > Signed-off-by: Damien Cassou > --- LGTM. Tomi > emacs/notmuch-show.el |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread Justus Winter
Quoting David Bremner (2012-09-24 12:44:04) > Justus Winter <4winter at informatik.uni-hamburg.de> writes: > > > We need to discuss where those kind of macro definitions abstracting > > away compiler differences should go. None of the files in util > > includes notmuch-private.h, so I was unsure

RFC: Annotate internal_error with the attribute noreturn 2nd patchset

2012-09-24 Thread David Bremner
Justus Winter <4winter at informatik.uni-hamburg.de> writes: >> The util stuff is "lower level" than lib/ so it makes sense to me to put >> common stuff there. > > Maybe we should add this file to compat? Sure, given appropriate re-wording of compat/README d

[PATCH 0/5] Notmuch Pick (WIP or contrib)

2012-09-24 Thread David Bremner
Mark Walters writes: > > The code is not of the same standard as mainline code: in particular a > lot of the code is written by me and is working but unidiomatic > lisp. It has also not had widespread testing so I would expect it to > have several bugs. I have gotten the following traceback

[PATCH 1/6] Provide a __has_attribute compatibility macro

2012-09-24 Thread Justus Winter
__has_attribute is defined by clang and tests whether a given function attribute is supported by clang. Add a compatibility macro for other compilers. Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de> --- compat/function-attributes.h | 31 +++ 1

[PATCH 4/6] Fix the COERCE_STATUS macro

2012-09-24 Thread Justus Winter
Fix the COERCE_STATUS macro to handle _internal_error being declared as void function. Note that the function _internal_error does not return. Evaluating to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de> ---

[PATCH 6/6] Avoid potentially dereferencing a NULL pointer

2012-09-24 Thread Justus Winter
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers gracefully, but the G_OBJECT_TYPE used in the error handling block dereferences it without checking it first. Fix this by checking whether parent->part is valid. Found using the clang static analyzer. Signed-off-by: Justus Winter

[PATCH 2/6] Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE

2012-09-24 Thread Justus Winter
This attribute is understood by gcc since version 2.5. clang provides support for testing for function attributes using __has_attribute. For other compilers this macro evaluates to the empty string. Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de> ---

[PATCH 4/6] Fix the COERCE_STATUS macro

2012-09-24 Thread Austin Clements
Quoth Justus Winter on Sep 24 at 5:21 pm: > Fix the COERCE_STATUS macro to handle _internal_error being declared > as void function. > > Note that the function _internal_error does not return. Evaluating to > NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler. > > Signed-off-by:

nbook: a notmuch based address book written in python

2012-09-24 Thread Suvayu Ali
Hi, (I'm not subscribed to the list, so please cc: me in your replies) I am a new notmuch user. I use it with mutt. I wanted a Gmail like address book, so I used the python bindings for notmuch to write a small python program. This is supposed to behave like abook. Quality standards