[PATCH 1/3] emacs: use a single history for all searches

2011-12-24 Thread Dmitry Kurochkin
I got some positive feedback for replacing notmuch-hello search input with a button wich would call `notmuch-search' and read input from minibuffer as usual. This way we do not have to maintain 2 search interfaces and get history, tab completions and other minibuffer features in notmuch-hello sear

[PATCH 4/4] test: fix Emacs tests expected output after notmuch-hello search changes

2011-12-24 Thread Dmitry Kurochkin
--- test/emacs.expected-output/notmuch-hello |6 +++--- .../notmuch-hello-no-saved-searches|6 +++--- .../emacs.expected-output/notmuch-hello-with-empty |6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/emacs.expected-output/notmuc

[PATCH 3/4] emacs: hide recent searches if `notmuch-hello-recent-searches-max' is zero

2011-12-24 Thread Dmitry Kurochkin
--- emacs/notmuch-hello.el | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index fa33500..6015af4 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -30,7 +30,10 @@ (declare-function notmuch-pol

[PATCH 2/4] emacs: reindent `notmuch-hello' function

2011-12-24 Thread Dmitry Kurochkin
Reindent `notmuch-hello' function after the search history changes. --- emacs/notmuch-hello.el | 56 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index eb08a09..fa33500 100644 ---

[PATCH 1/4] emacs: unify search mechanisms

2011-12-24 Thread Dmitry Kurochkin
Before the change, there were two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Internally, notmuch-hello search widget uses `notmuch-search' function. But it uses widget field input instead of minibuffer. Such duplication is a m

[RFC][PATCH v4] emacs: Re-implement advance/rewind functions of notmuch-show-mode.

2011-12-24 Thread Austin Clements
Awesome. This looks significantly cleaner. I think this is worth pushing for the comment you added to notmuch-show-advance alone. This definitely changes the behavior of rewind, but other than one case I point out below, I think what you have now is much closer to an inverse of advance. It woul

[PATCH] Properly handle short writes in sigint handlers

2011-12-24 Thread Austin Clements
Quoth Tomi Ollila on Dec 23 at 2:30 pm: > On Fri, 23 Dec 2011 08:10:33 +, David Edmondson wrote: > > Sorry for being slow. > > > > Can you describe the situation in which you expect a write to stderr to > > be a short write? (Without error.) > > In the following hypothetical case (correct m

[PATCH] Properly handle short writes in sigint handlers

2011-12-24 Thread Austin Clements
Quoth David Edmondson on Dec 23 at 8:10 am: > Sorry for being slow. > > Can you describe the situation in which you expect a write to stderr to > be a short write? (Without error.) If the PTY buffer is nearly full because, say, my terminal emulator is a little behind or my SSH session is slow, I

[PATCH] emacs: fix docstring for `notmuch-search-line-faces'.

2011-12-24 Thread David Bremner
On Sat, 24 Dec 2011 00:40:34 +0400, Dmitry Kurochkin wrote: > Examples in documentation for `notmuch-search-line-faces' had an extra > quote, e.g.: > > '(\"unread\" . '(:foreground \"green\")) > Pushed. d

[PATCH v2] emacs: call notmuch-show instead of notmuch-search in buttonised id: links

2011-12-24 Thread David Bremner
On Thu, 22 Dec 2011 20:59:12 -0800, Jameson Graef Rollins wrote: > Since message-ids necessarily match just a single message, there's no > reason to do a search for the id before viewing the actual message; > the search just becomes an extra screen to click through. Clicking on > an id: links now

Re: [RFC][PATCH v4] emacs: Re-implement advance/rewind functions of notmuch-show-mode.

2011-12-24 Thread Austin Clements
Awesome. This looks significantly cleaner. I think this is worth pushing for the comment you added to notmuch-show-advance alone. This definitely changes the behavior of rewind, but other than one case I point out below, I think what you have now is much closer to an inverse of advance. It woul

Re: [PATCH] Properly handle short writes in sigint handlers

2011-12-24 Thread Austin Clements
Quoth Tomi Ollila on Dec 23 at 2:30 pm: > On Fri, 23 Dec 2011 08:10:33 +, David Edmondson wrote: > > Sorry for being slow. > > > > Can you describe the situation in which you expect a write to stderr to > > be a short write? (Without error.) > > In the following hypothetical case (correct m

Re: [PATCH] Properly handle short writes in sigint handlers

2011-12-24 Thread Austin Clements
Quoth David Edmondson on Dec 23 at 8:10 am: > Sorry for being slow. > > Can you describe the situation in which you expect a write to stderr to > be a short write? (Without error.) If the PTY buffer is nearly full because, say, my terminal emulator is a little behind or my SSH session is slow, I

[PATCH v5 3/4] Utility function to seek in MIME trees in depth-first order.

2011-12-24 Thread Austin Clements
This function matches how we number parts for the --part argument to show. It will allow us to jump directly to the desired part, rather than traversing the entire tree and carefully tracking whether or not we're "in the zone". --- mime-node.c | 27 +++ notmuch-clie

[PATCH v5 1/4] show: Pass notmuch_message_t instead of path to show_message_body.

2011-12-24 Thread Austin Clements
In addition to simplifying the code, we'll need the notmuch_message_t* in show_message_body shortly. --- notmuch-client.h |2 +- notmuch-reply.c |3 +-- notmuch-show.c |3 +-- show-message.c |3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/notmuch-client.

[PATCH v5 0/4] First step of 'show' rewrite

2011-12-24 Thread Austin Clements
Rename sig_attempted to verify_attempted. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v5 4/4] show: Rewrite show_message_body to use the MIME tree interface.

2011-12-24 Thread Austin Clements
This removes all of the MIME traversal logic from show_message_body and leaves only its interaction with the format callbacks. Besides isolating concerns, since traversal happens behind a trivial interface, there is now much less code duplication in show_message_part. Also, this uses mime_node_se

[PATCH v5 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Austin Clements
This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a MIME part tree becomes a two-line for loop. Furthermore, the MIME node structure provides easy access to envelopes for message parts as well as cryptographic infor

[PATCH v4 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Austin Clements
Quoth Jameson Graef Rollins on Dec 23 at 11:55 pm: > On Fri, 23 Dec 2011 22:45:46 -0500, Austin Clements > wrote: > > +/* True if decryption of this part was attempted. */ > > +notmuch_bool_t decrypt_attempted; > > +/* True if decryption of this part's child succeeded. In this > > +

Re: [PATCH] emacs: fix docstring for `notmuch-search-line-faces'.

2011-12-24 Thread David Bremner
On Sat, 24 Dec 2011 00:40:34 +0400, Dmitry Kurochkin wrote: > Examples in documentation for `notmuch-search-line-faces' had an extra > quote, e.g.: > > '(\"unread\" . '(:foreground \"green\")) > Pushed. d ___ notmuch mailing list notmuch@notmuchm

[PATCH v5 4/4] show: Rewrite show_message_body to use the MIME tree interface.

2011-12-24 Thread Austin Clements
This removes all of the MIME traversal logic from show_message_body and leaves only its interaction with the format callbacks. Besides isolating concerns, since traversal happens behind a trivial interface, there is now much less code duplication in show_message_part. Also, this uses mime_node_se

[PATCH v5 3/4] Utility function to seek in MIME trees in depth-first order.

2011-12-24 Thread Austin Clements
This function matches how we number parts for the --part argument to show. It will allow us to jump directly to the desired part, rather than traversing the entire tree and carefully tracking whether or not we're "in the zone". --- mime-node.c | 27 +++ notmuch-clie

[PATCH v5 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Austin Clements
This wraps all of the complex MIME part handling in a single, simple function that gets part N from *any* MIME object, so traversing a MIME part tree becomes a two-line for loop. Furthermore, the MIME node structure provides easy access to envelopes for message parts as well as cryptographic infor

[PATCH v5 1/4] show: Pass notmuch_message_t instead of path to show_message_body.

2011-12-24 Thread Austin Clements
In addition to simplifying the code, we'll need the notmuch_message_t* in show_message_body shortly. --- notmuch-client.h |2 +- notmuch-reply.c |3 +-- notmuch-show.c |3 +-- show-message.c |3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/notmuch-client.

[PATCH v5 0/4] First step of 'show' rewrite

2011-12-24 Thread Austin Clements
Rename sig_attempted to verify_attempted.

Re: [PATCH v2] emacs: call notmuch-show instead of notmuch-search in buttonised id: links

2011-12-24 Thread David Bremner
On Thu, 22 Dec 2011 20:59:12 -0800, Jameson Graef Rollins wrote: > Since message-ids necessarily match just a single message, there's no > reason to do a search for the id before viewing the actual message; > the search just becomes an extra screen to click through. Clicking on > an id: links no

[PATCH] notmuch: Quiet buildbot warnings.

2011-12-24 Thread Tom Prince
On Wed, 21 Dec 2011 23:06:50 +0100, Thomas Jost wrote: Non-text part: multipart/mixed Non-text part: multipart/signed > On Tue, 20 Dec 2011 15:20:04 +, David Edmondson wrote: > > Cast away the result of various *write functions. Provide a default > > value for some variables to avoid "use be

[PATCH v4 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Dmitry Kurochkin
On Fri, 23 Dec 2011 23:55:34 -0800, Jameson Graef Rollins wrote: > On Fri, 23 Dec 2011 22:45:46 -0500, Austin Clements > wrote: > > +/* True if decryption of this part was attempted. */ > > +notmuch_bool_t decrypt_attempted; > > +/* True if decryption of this part's child succeeded.

Re: [PATCH] notmuch: Quiet buildbot warnings.

2011-12-24 Thread Tom Prince
On Wed, 21 Dec 2011 23:06:50 +0100, Thomas Jost wrote: Non-text part: multipart/mixed Non-text part: multipart/signed > On Tue, 20 Dec 2011 15:20:04 +, David Edmondson wrote: > > Cast away the result of various *write functions. Provide a default > > value for some variables to avoid "use bef

Re: [PATCH v4 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Austin Clements
Quoth Jameson Graef Rollins on Dec 23 at 11:55 pm: > On Fri, 23 Dec 2011 22:45:46 -0500, Austin Clements wrote: > > +/* True if decryption of this part was attempted. */ > > +notmuch_bool_t decrypt_attempted; > > +/* True if decryption of this part's child succeeded. In this > > +

Re: [PATCH 1/3] emacs: use a single history for all searches

2011-12-24 Thread Dmitry Kurochkin
I got some positive feedback for replacing notmuch-hello search input with a button wich would call `notmuch-search' and read input from minibuffer as usual. This way we do not have to maintain 2 search interfaces and get history, tab completions and other minibuffer features in notmuch-hello sear

[python] Threads/Messages inconsistencies

2011-12-24 Thread Patrick Totzke
Hi, I noticed some inconsistencies in the way the bindings treat Threads and Messages which in my opinion should look and behave alike. 1. There is no Query.count_threads as an equivalent to Query.count_messages, although there seems to be a function `notmuch_query_count_threads` offered by

[PATCH v4 0/4] First step of 'show' rewrite

2011-12-24 Thread Dmitry Kurochkin
On Fri, 23 Dec 2011 22:45:44 -0500, Austin Clements wrote: > This addresses Dmitry's and Jameson's review comments from > id:"87k46572f7.fsf at gmail.com" > id:"87liqk5dly.fsf at servo.finestructure.net" > id:"87hb187iu6.fsf at gmail.com" > and rebases to current master. > > I'd like a quic

[PATCH 3/3] emacs: hide recent searches if `notmuch-hello-recent-searches-max' is zero

2011-12-24 Thread Dmitry Kurochkin
--- emacs/notmuch-hello.el | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 0922821..821ef22 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -36,7 +36,10 @@ "Variable to store history

[PATCH 2/3] emacs: reindent `notmuch-hello' function

2011-12-24 Thread Dmitry Kurochkin
Reindent `notmuch-hello' function after the search history changes. --- emacs/notmuch-hello.el | 56 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index ba34ac5..0922821 100644 ---

[PATCH 1/3] emacs: use a single history for all searches

2011-12-24 Thread Dmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function. ---

[Patch 2/3] Respect window margins in notmuch-hello.el

2011-12-24 Thread Dmitry Kurochkin
Hi Ivy. The patch looks good to me. But I think it would be very nice to have a test for it, which would be broken at first and fixed by this patch. Can you add it please? Regards, Dmitry

[python] Threads/Messages inconsistencies

2011-12-24 Thread Patrick Totzke
Hi, I noticed some inconsistencies in the way the bindings treat Threads and Messages which in my opinion should look and behave alike. 1. There is no Query.count_threads as an equivalent to Query.count_messages, although there seems to be a function `notmuch_query_count_threads` offered by

[PATCH] emacs: fix docstring for `notmuch-search-line-faces'.

2011-12-24 Thread Dmitry Kurochkin
Examples in documentation for `notmuch-search-line-faces' had an extra quote, e.g.: '(\"unread\" . '(:foreground \"green\")) Which resulted in values like: (\"unread\" quote (:foreground \"green\")) And tons of "Invalid face reference: quote" errors in the messages buffer. --- emacs/notmuc

Re: [PATCH v4 2/4] Introduce a generic tree-like abstraction for MIME traversal.

2011-12-24 Thread Dmitry Kurochkin
On Fri, 23 Dec 2011 23:55:34 -0800, Jameson Graef Rollins wrote: > On Fri, 23 Dec 2011 22:45:46 -0500, Austin Clements wrote: > > +/* True if decryption of this part was attempted. */ > > +notmuch_bool_t decrypt_attempted; > > +/* True if decryption of this part's child succeeded. I