[PATCH v2 3/4] new: Print final fatal error message to stderr

2012-04-21 Thread Austin Clements
This was going to stdout. I removed the newline at the beginning of printing the fatal error message because it wouldn't make sense if you were only looking at the stderr stream (e.g., you had redirected stdout to /dev/null). --- notmuch-new.c |4 ++-- 1 files changed, 2 insertions(+), 2 dele

[PATCH v2 4/4] new: Fix missing end_atomic in remove_filename on error

2012-04-21 Thread Austin Clements
Previously, if we failed to find the message by filename in remove_filename, we would return immediately from the function without ending its atomic block. Now this code follows the usual goto DONE idiom to perform cleanup. --- notmuch-new.c |5 - 1 files changed, 4 insertions(+), 1 delet

[PATCH v2 2/4] new: Handle fatal errors in remove_filename and _remove_directory

2012-04-21 Thread Austin Clements
Previously such errors were simply ignored. Now they cause an immediate cleanup and abort. --- notmuch-new.c | 25 +++-- 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 15c0b36..92e0489 100644 --- a/notmuch-new.c +++ b/notm

[PATCH v2 0/4] Fix some error handling in notmuch new

2012-04-21 Thread Austin Clements
Version 2 should address Mark's comments. It also adds a patch to fix an additional error handling error he pointed out in remove_filename. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2 1/4] new: Consistently treat fatal errors as fatal

2012-04-21 Thread Austin Clements
Previously, fatal errors in add_files_recursive were not treated as fatal by its callers (including itself!). This makes add_files_recursive errors consistently fatal and updates all callers to treat them as fatal. --- notmuch-new.c | 16 1 files changed, 12 insertions(+), 4 de

Re: [PATCH 2/3] new: Handle fatal errors in remove_filename and _remove_directory

2012-04-21 Thread Austin Clements
Quoth Mark Walters on Apr 16 at 5:02 pm: > On Mon, 27 Feb 2012, Austin Clements wrote: > > Previously such errors were simply ignored. Now they cause an > > immediate cleanup and abort. > > This one looks fine except for a minor query. > > > --- > > notmuch-new.c | 24 ++

Re: [PATCH 1/3] new: Consistently treat fatal errors as fatal

2012-04-21 Thread Austin Clements
Quoth Mark Walters on Apr 16 at 4:53 pm: > > On Mon, 27 Feb 2012, Austin Clements wrote: > > Previously, fatal errors in add_files_recursive were not treated as > > fatal by its callers (including itself!) and add_files_recursive > > sometimes returned errors on non-fatal conditions. This makes

[PATCH 2/2] emacs: Correctly quote non-text/plain parts in reply

2012-04-21 Thread Adam Wolfe Gordon
Quote non-text parts nicely by displaying them with mm-display-part before calling message-cite-original to quote them. HTML-only emails can now be quoted correctly. Mark the test for this feature as not broken. --- emacs/notmuch-mua.el | 20 +++- test/emacs |1 -

[PATCH 1/2] test: Replying to an HTML-only message in emacs

2012-04-21 Thread Adam Wolfe Gordon
With the latest reply infrastructure, we should be able to nicely quote HTML-only emails. But currently emacs quotes the raw HTML instead of parsing it first. This commit adds a test for this case. This test currently marked as broken. --- test/emacs | 27 +++ 1 files ch

[PATCH 0/2] Replying to HTML-only emails

2012-04-21 Thread Adam Wolfe Gordon
Hi all, My recent reply enhancements were originally intended to allow proper quoting of HTML-only email in reply. While the final version was a big improvement on reply in general, it didn't actually acheive this goal. So, this series finishes that work, using mm-display-part to render the conte

[PATCH 0/2] Replying to HTML-only emails

2012-04-21 Thread Adam Wolfe Gordon
Hi all, My recent reply enhancements were originally intended to allow proper quoting of HTML-only email in reply. While the final version was a big improvement on reply in general, it didn't actually acheive this goal. So, this series finishes that work, using mm-display-part to render the conte

[PATCH 2/2] emacs: Correctly quote non-text/plain parts in reply

2012-04-21 Thread Adam Wolfe Gordon
Quote non-text parts nicely by displaying them with mm-display-part before calling message-cite-original to quote them. HTML-only emails can now be quoted correctly. Mark the test for this feature as not broken. --- emacs/notmuch-mua.el | 20 +++- test/emacs |1 -

[PATCH 1/2] test: Replying to an HTML-only message in emacs

2012-04-21 Thread Adam Wolfe Gordon
With the latest reply infrastructure, we should be able to nicely quote HTML-only emails. But currently emacs quotes the raw HTML instead of parsing it first. This commit adds a test for this case. This test currently marked as broken. --- test/emacs | 27 +++ 1 files ch

[PATCH v3 1/2] cli: make --entire-thread=false work for format=json.

2012-04-21 Thread Adam Wolfe Gordon
On Sat, Apr 21, 2012 at 03:15, Mark Walters wrote: > The --entire-thread option in notmuch-show.c defaults to true when > format=json. Previously there was no way to turn this off. This patch > makes it respect --entire-thread=false. > > The one subtlety is that we initialise a notmuch_bool_t to

Re: [PATCH v3 1/2] cli: make --entire-thread=false work for format=json.

2012-04-21 Thread Adam Wolfe Gordon
On Sat, Apr 21, 2012 at 03:15, Mark Walters wrote: > The --entire-thread option in notmuch-show.c defaults to true when > format=json. Previously there was no way to turn this off. This patch > makes it respect --entire-thread=false. > > The one subtlety is that we initialise a notmuch_bool_t to -

[PATCH v3 2/2] emacs: make elide messages use notmuch-show for omitting messages.

2012-04-21 Thread Mark Walters
Previously the elide messages code got the entire-thread from notmuch-show.c and then threw away all non-matching messages. This version calls notmuch-show.c without the --entire-thread flag so it never receives the non-matching messages in the first place. This makes it substantially faster. ---

[PATCH v3 1/2] cli: make --entire-thread=false work for format=json.

2012-04-21 Thread Mark Walters
The --entire-thread option in notmuch-show.c defaults to true when format=json. Previously there was no way to turn this off. This patch makes it respect --entire-thread=false. The one subtlety is that we initialise a notmuch_bool_t to -1 to indicate that the option parsing has not set it. This al

[PATCH v3 0/2] Allow JSON to use non-entire thread, and use for elide

2012-04-21 Thread Mark Walters
This is a rebased version of [1] with the bugfix [2] rolled in and the style change suggested by Adam in [3]. I haven't added any tests yet: there do not seem to be any tests of threading in JSON currently. I intend to rebase my show-tests [4] (and can include/add tests for this). Alternatively th

[PATCH] vim: fix regex after "notmuch show" output change

2012-04-21 Thread Felipe Contreras
On Fri, Mar 30, 2012 at 1:02 AM, Jakob wrote: > The new field "excluded" was added to the output and made this regex fail. > --- > ?vim/plugin/notmuch.vim | ? ?5 +++-- > ?1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim > index 21985

[PATCH] vim: simplify build

2012-04-21 Thread Felipe Contreras
On Wed, Apr 18, 2012 at 7:03 PM, Tomi Ollila wrote: > So, $(CURDIR) has 3 votes :D All right. Pushed :) -- Felipe Contreras

Re: [PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor

2012-04-21 Thread Sebastian Spaeth
Austin Clements writes: > (I think it also doesn't make sense to expose notmuch_database_destroy > as a general, public method since it will free all of the other C > objects out from under the bindings, resulting in exactly the double > free-type crashes that you're trying to avoid. It appears t

[PATCH v3 0/2] Allow JSON to use non-entire thread, and use for elide

2012-04-21 Thread Mark Walters
This is a rebased version of [1] with the bugfix [2] rolled in and the style change suggested by Adam in [3]. I haven't added any tests yet: there do not seem to be any tests of threading in JSON currently. I intend to rebase my show-tests [4] (and can include/add tests for this). Alternatively th

[PATCH v3 2/2] emacs: make elide messages use notmuch-show for omitting messages.

2012-04-21 Thread Mark Walters
Previously the elide messages code got the entire-thread from notmuch-show.c and then threw away all non-matching messages. This version calls notmuch-show.c without the --entire-thread flag so it never receives the non-matching messages in the first place. This makes it substantially faster. ---

[PATCH v3 1/2] cli: make --entire-thread=false work for format=json.

2012-04-21 Thread Mark Walters
The --entire-thread option in notmuch-show.c defaults to true when format=json. Previously there was no way to turn this off. This patch makes it respect --entire-thread=false. The one subtlety is that we initialise a notmuch_bool_t to -1 to indicate that the option parsing has not set it. This al