[PATCH] emacs: allow to set RETAIN-STATE for `notmuch-show-refresh-view' interactively

2012-02-14 Thread David Bremner
On Mon, 13 Feb 2012 15:09:07 +0400, Dmitry Kurochkin wrote: > The notmuch-show view refresh function (`notmuch-show-refresh-view', > bound to "=") accepts an optional RETAIN-STATE argument. The patch > allows to set this argument interactively by using "C-u =". pushed d

[PATCH] Free the results of scandir()

2012-02-14 Thread David Bremner
On Tue, 7 Feb 2012 05:05:03 -0500, Ethan Glasser-Camp wrote: > From: Ethan Glasser-Camp > > scandir() returns "strings allocated via malloc(3)" which are then > "collected in array namelist which is allocated via > malloc(3)". Currently we just free the array namelist. Instead, free > all the

[PATCH 0/8] Rewrite JSON show format

2012-02-14 Thread Adam Wolfe Gordon
Hi Austin, On Tue, Feb 14, 2012 at 10:33, Austin Clements wrote: > The saga continues. ?As for the text format, this first shifts lots of > code around without changing its semantics, then it dives in and > simplifies a lot of things. ?Don't be put off by the number of > patches; most of them

[PATCH v5 0/4] Reply enhancements (was: quoting HTML email ...)

2012-02-14 Thread Adam Wolfe Gordon
I've just sent new versions of parts 1, 2, and 4. The only change is that I've changed the output of the reply headers to be consistent with the other JSON formats (capitalized, in the right order). Of course, that had a ripple effect on the tests and emacs. Sorry for the double-mail - I just

[PATCH v5.1 4/4] emacs: Use the new JSON reply format and message-cite-original

2012-02-14 Thread Adam Wolfe Gordon
Using the new JSON reply format allows emacs to quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function

[PATCH v5.1 2/4] reply: Add a JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML

[PATCH v5.1 1/4] test: Add broken test for the new JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
--- Adjusted the header display to be consistent with the other JSON formats. test/multipart | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/test/multipart b/test/multipart index a3036b4..e7abcc2 100755 ---

[PATCH v5 4/4] emacs: Use the new JSON reply format and message-cite-original

2012-02-14 Thread Adam Wolfe Gordon
Using the new JSON reply format allows emacs to quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function

[PATCH v5 3/4] man: Update notmuch-reply man page for JSON format.

2012-02-14 Thread Adam Wolfe Gordon
--- man/man1/notmuch-reply.1 |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1 index 5160ece..307abee 100644 --- a/man/man1/notmuch-reply.1 +++ b/man/man1/notmuch-reply.1 @@ -43,6 +43,11 @@ include .BR default

[PATCH v5 2/4] reply: Add a JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML

[PATCH v5 1/4] test: Add broken test for the new JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
--- test/multipart | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/test/multipart b/test/multipart index a3036b4..9651568 100755 --- a/test/multipart +++ b/test/multipart @@ -589,6 +589,57 @@ Non-text part: text/html EOF

[PATCH v5 0/4] Reply enhancements (was: quoting HTML email ...)

2012-02-14 Thread Adam Wolfe Gordon
Hi everyone, There are relatively few changes from the last version [1], but the JSON format has big changes again. A summary of all the changes: * The JSON reply format now uses the new formatter from the show JSON format. This means that the MUA will not need to call notmuch show for

[PATCH] emacs: Fix display of highlighted line in notmuch-show

2012-02-14 Thread Jani Nikula
On Tue, 14 Feb 2012 11:24:16 +0100, Michal Sojka wrote: > When notmuch-search-line-faces is used to set background color in search > results, the highlight of the current line is not always displayed > correctly. This patch fixes that by increasing the priority property of > the highlight

[PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-14 Thread Michal Sojka
When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of the highlight overlay. --- emacs/notmuch.el | 15 +++ 1 files changed,

[PATCH v6 3/3] NEWS: add news section for new.ignore

2012-02-14 Thread Austin Clements
On Mon, 6 Feb 2012 11:28:25 +0200, Tomi Ollila wrote: > Added NEWS section 'Mail store folder/file ignore'. > --- > NEWS |6 ++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/NEWS b/NEWS > index 5c5b645..59da584 100644 > --- a/NEWS > +++ b/NEWS > @@ -29,6 +29,12 @@

[PATCH v6 1/3] test: add tests wrt ignoring user-specified files and directories

2012-02-14 Thread Austin Clements
On Mon, 6 Feb 2012 11:28:23 +0200, Tomi Ollila wrote: > Files and directories which are specified in 'new.ignore' in the > config file shouldn't be indexed nor reported by `notmuch new'. > > This is basically Pieter's work with Austin's comments addressed. > --- > test/new | 22

[PATCH v2] emacs: Add more processing of displayed headers.

2012-02-14 Thread David Edmondson
o be part of this series? No, it's not related to those others. Mistaken 'In-Reply-To'. -- 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/n

[PATCH 8/8] show: Further general simplifications of the JSON formatter

2012-02-14 Thread Austin Clements
--- notmuch-show.c | 61 --- 1 files changed, 22 insertions(+), 39 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 07276c7..6a171a4 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -678,9 +678,10 @@ format_part_json (const

[PATCH 7/8] show: Make format_part_sigstatus_json's API consistent between GMIME 2.4 and 2.6

2012-02-14 Thread Austin Clements
The implementation is still different for GMIME 2.4 and 2.6, but at least now the caller doesn't have to be aware of this. --- notmuch-show.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 8fb6fa6..07276c7 100644 ---

[PATCH 6/8] show: Make JSON helper functions print complete objects

2012-02-14 Thread Austin Clements
This makes the main recursive function easier to follow because helper functions don't add fields to the running object. --- notmuch-show.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 6259d30..8fb6fa6 100644 ---

[PATCH 4/8] show: Unify JSON header output for messages and message parts

2012-02-14 Thread Austin Clements
This has three ramifications: - Blank To and Cc headers are no longer output for messages. - Dates are now canonicalized for messages, which means they always have a day of the week and GMT is printed + (never -) - Invalid From message headers are handled slightly differently, since

[PATCH 1/8] Document the JSON schemata used by show and search

2012-02-14 Thread Austin Clements
--- devel/schemata | 135 ++ notmuch-search.c |3 + notmuch-show.c |2 + 3 files changed, 140 insertions(+), 0 deletions(-) create mode 100644 devel/schemata diff --git a/devel/schemata b/devel/schemata new file mode 100644 index

[PATCH 0/8] Rewrite JSON show format

2012-02-14 Thread Austin Clements
The saga continues. As for the text format, this first shifts lots of code around without changing its semantics, then it dives in and simplifies a lot of things. Don't be put off by the number of patches; most of them are straightforward. As an added bonus, I documented (!) the JSON format for

[RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane

2012-02-14 Thread Mark Walters
I have now done some benchmarking/profiling of the notmuch-pick mode. These are all done running locally (i.e., no ssh, nfs or anything) but on a fairly old computer with a slow hard disk. The timings given are for the second run (so the files and database are in cache). The profiling is done by

[PATCH] emacs: Fix display of highlighted line in notmuch-show

2012-02-14 Thread Michal Sojka
When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of the highlight overlay. --- emacs/notmuch.el | 15 +++ 1 files changed,

notmuch-emacs bug report -- infinite looping trying to select next message

2012-02-14 Thread Michael Hudson-Doyle
art -- A non-text attachment was scrubbed... Name: notmuch-el-hang.mbox.gz Type: application/octet-stream Size: 25936 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120214/21ad530d/attachment-0001.obj>

notmuch-emacs bug report -- infinite looping trying to select next message

2012-02-14 Thread Rodney Lorrimar
Hi Michael, On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle wrote: > The attached gzipped mbox appears to trip up the emacs interface. The > problem seems to come from the message with id > CAGNsrLCWv6=36q+q+5Hc_SzgdZ2ergeKkapT7T3xXvim=2cK+A at mail.gmail.com. > > If you load up the

[PATCH] emacs: Fix display of highlighted line in notmuch-show

2012-02-14 Thread Austin Clements
Quoth Michal Sojka on Feb 14 at 11:24 am: > When notmuch-search-line-faces is used to set background color in search > results, the highlight of the current line is not always displayed > correctly. This patch fixes that by increasing the priority property of > the highlight overlay. LGTM. Too

[RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane

2012-02-14 Thread Austin Clements
Quoth Mark Walters on Feb 14 at 12:28 pm: > Finally, if notmuch-pick were able to do work asynchronously (as > notmuch-search does now) then I think all the speed concerns would go > away. However, I am not sure how to do incremental json parsing. For JSON search, at least, I think we've

[PATCH v2] emacs: Add more processing of displayed headers.

2012-02-14 Thread David Bremner
On Mon, 6 Feb 2012 15:39:05 +, David Edmondson wrote: > Wrap headers to the width of the window and indent continuations. Hi David; Not sure what this patch is doing in the middle of this thread? Is it meant to be part of this series? d

[PATCH 0/2] Rewrite text show format

2012-02-14 Thread Adam Wolfe Gordon
Hi Austin, On Wed, Jan 25, 2012 at 23:55, Austin Clements wrote: > And now the real fun begins. ?This series translates the text > formatter into the new format style in two steps: the first patch is a > big diff but just shuffles code and the second actually takes > advantage of the new

Re: notmuch-emacs bug report -- infinite looping trying to select next message

2012-02-14 Thread Rodney Lorrimar
Hi Michael, On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle michael.hud...@canonical.com wrote: The attached gzipped mbox appears to trip up the emacs interface. The problem seems to come from the message with id CAGNsrLCWv6=36q+q+5Hc_SzgdZ2ergeKkapT7T3xXvim=2c...@mail.gmail.com.

[PATCH] emacs: Fix display of highlighted line in notmuch-show

2012-02-14 Thread Michal Sojka
When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of the highlight overlay. --- emacs/notmuch.el | 15 +++ 1 files changed,

Re: [PATCH v2] emacs: Add more processing of displayed headers.

2012-02-14 Thread David Bremner
On Mon, 6 Feb 2012 15:39:05 +, David Edmondson d...@dme.org wrote: Wrap headers to the width of the window and indent continuations. Hi David; Not sure what this patch is doing in the middle of this thread? Is it meant to be part of this series? d

Re: [PATCH 0/2] Rewrite text show format

2012-02-14 Thread Adam Wolfe Gordon
Hi Austin, On Wed, Jan 25, 2012 at 23:55, Austin Clements amdra...@mit.edu wrote: And now the real fun begins.  This series translates the text formatter into the new format style in two steps: the first patch is a big diff but just shuffles code and the second actually takes advantage of the

Re: [RFC PATCH v3 00/11] notmuch-pick: an emacs threaded message view with split-pane

2012-02-14 Thread Austin Clements
Quoth Mark Walters on Feb 14 at 12:28 pm: Finally, if notmuch-pick were able to do work asynchronously (as notmuch-search does now) then I think all the speed concerns would go away. However, I am not sure how to do incremental json parsing. For JSON search, at least, I think we've concluded

Re: [PATCH] emacs: Fix display of highlighted line in notmuch-show

2012-02-14 Thread Jani Nikula
On Tue, 14 Feb 2012 11:24:16 +0100, Michal Sojka so...@os.inf.tu-dresden.de wrote: When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of

[PATCH v2] emacs: Fix display of highlighted line in notmuch-search

2012-02-14 Thread Michal Sojka
When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of the highlight overlay. --- emacs/notmuch.el | 15 +++ 1 files changed,

[PATCH 0/8] Rewrite JSON show format

2012-02-14 Thread Austin Clements
The saga continues. As for the text format, this first shifts lots of code around without changing its semantics, then it dives in and simplifies a lot of things. Don't be put off by the number of patches; most of them are straightforward. As an added bonus, I documented (!) the JSON format for

[PATCH 1/8] Document the JSON schemata used by show and search

2012-02-14 Thread Austin Clements
--- devel/schemata | 135 ++ notmuch-search.c |3 + notmuch-show.c |2 + 3 files changed, 140 insertions(+), 0 deletions(-) create mode 100644 devel/schemata diff --git a/devel/schemata b/devel/schemata new file mode 100644 index

[PATCH 3/8] show: Use consistent header ordering in the JSON format

2012-02-14 Thread Austin Clements
Previously, top-level message headers were printed as Subject, From, To, Date, while embedded message headers were printed From, To, Subject, Date. This makes both cases use the former order and updates the tests accordingly. --- notmuch-show.c |6 +++--- test/multipart |8 2

[PATCH 2/8] show: Convert JSON format to the new self-recursive style

2012-02-14 Thread Austin Clements
As before, this is all code movement and a smidgen of glue. This moves the existing JSON formatter code into one self-recursive function, but doesn't change any of the logic to take advantage of the new structure. In general, leafs of the JSON structure are left in helper functions (most of them

[PATCH 5/8] show: Simplify talloc use in format_headers_json

2012-02-14 Thread Austin Clements
Previously there was an unnecessary talloc context. --- notmuch-show.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 209ff45..6259d30 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -291,37

[PATCH 6/8] show: Make JSON helper functions print complete objects

2012-02-14 Thread Austin Clements
This makes the main recursive function easier to follow because helper functions don't add fields to the running object. --- notmuch-show.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 6259d30..8fb6fa6 100644 ---

[PATCH 4/8] show: Unify JSON header output for messages and message parts

2012-02-14 Thread Austin Clements
This has three ramifications: - Blank To and Cc headers are no longer output for messages. - Dates are now canonicalized for messages, which means they always have a day of the week and GMT is printed + (never -) - Invalid From message headers are handled slightly differently, since

[PATCH 8/8] show: Further general simplifications of the JSON formatter

2012-02-14 Thread Austin Clements
--- notmuch-show.c | 61 --- 1 files changed, 22 insertions(+), 39 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 07276c7..6a171a4 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -678,9 +678,10 @@ format_part_json (const

Re: [PATCH v6 1/3] test: add tests wrt ignoring user-specified files and directories

2012-02-14 Thread Austin Clements
On Mon, 6 Feb 2012 11:28:23 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Files and directories which are specified in 'new.ignore' in the config file shouldn't be indexed nor reported by `notmuch new'. This is basically Pieter's work with Austin's comments addressed. --- test/new | 22

Re: [PATCH v6 3/3] NEWS: add news section for new.ignore

2012-02-14 Thread Austin Clements
On Mon, 6 Feb 2012 11:28:25 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Added NEWS section 'Mail store folder/file ignore'. --- NEWS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 5c5b645..59da584 100644 --- a/NEWS +++ b/NEWS @@ -29,6

Re: [PATCH v6 1/3] test: add tests wrt ignoring user-specified files and directories

2012-02-14 Thread Austin Clements
On Mon, 13 Feb 2012 10:20:28 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Those interested in this patch set please check lates changes. The test patch (1/3) has been slighty modified from Pieter's version and NEWS patch (3/3) is new. The actual functionality in patch 2/3 is exactly the same

Re: notmuch-emacs bug report -- infinite looping trying to select next message

2012-02-14 Thread Michael Hudson-Doyle
Thanks for the reply! On Tue, 14 Feb 2012 10:41:20 +0100, Rodney Lorrimar d...@rodney.id.au wrote: Hi Michael, On Tue, 14 Feb 2012 11:01:56 +1300, Michael Hudson-Doyle michael.hud...@canonical.com wrote: The attached gzipped mbox appears to trip up the emacs interface. The problem

Re: [PATCH] Free the results of scandir()

2012-02-14 Thread David Bremner
On Tue, 7 Feb 2012 05:05:03 -0500, Ethan Glasser-Camp gla...@cs.rpi.edu wrote: From: Ethan Glasser-Camp et...@betacantrips.com scandir() returns strings allocated via malloc(3) which are then collected in array namelist which is allocated via malloc(3). Currently we just free the array

Re: [PATCH] emacs: allow to set RETAIN-STATE for `notmuch-show-refresh-view' interactively

2012-02-14 Thread David Bremner
On Mon, 13 Feb 2012 15:09:07 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The notmuch-show view refresh function (`notmuch-show-refresh-view', bound to =) accepts an optional RETAIN-STATE argument. The patch allows to set this argument interactively by using C-u =. pushed d

[PATCH v5 0/4] Reply enhancements (was: quoting HTML email ...)

2012-02-14 Thread Adam Wolfe Gordon
Hi everyone, There are relatively few changes from the last version [1], but the JSON format has big changes again. A summary of all the changes: * The JSON reply format now uses the new formatter from the show JSON format. This means that the MUA will not need to call notmuch show for

[PATCH v5 1/4] test: Add broken test for the new JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
--- test/multipart | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/test/multipart b/test/multipart index a3036b4..9651568 100755 --- a/test/multipart +++ b/test/multipart @@ -589,6 +589,57 @@ Non-text part: text/html EOF

[PATCH v5 2/4] reply: Add a JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML

[PATCH v5 4/4] emacs: Use the new JSON reply format and message-cite-original

2012-02-14 Thread Adam Wolfe Gordon
Using the new JSON reply format allows emacs to quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function

[PATCH v5.1 1/4] test: Add broken test for the new JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
--- Adjusted the header display to be consistent with the other JSON formats. test/multipart | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/test/multipart b/test/multipart index a3036b4..e7abcc2 100755 ---

[PATCH v5.1 2/4] reply: Add a JSON reply format.

2012-02-14 Thread Adam Wolfe Gordon
This new JSON format for replies includes headers generated for a reply message as well as the headers of the original message. Using this data, a client can intelligently create a reply. For example, the emacs client will be able to create replies with quoted HTML parts by parsing the HTML

[PATCH v5.1 4/4] emacs: Use the new JSON reply format and message-cite-original

2012-02-14 Thread Adam Wolfe Gordon
Using the new JSON reply format allows emacs to quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function

Re: [PATCH v5 0/4] Reply enhancements (was: quoting HTML email ...)

2012-02-14 Thread Adam Wolfe Gordon
I've just sent new versions of parts 1, 2, and 4. The only change is that I've changed the output of the reply headers to be consistent with the other JSON formats (capitalized, in the right order). Of course, that had a ripple effect on the tests and emacs. Sorry for the double-mail - I just

Re: [PATCH 0/8] Rewrite JSON show format

2012-02-14 Thread Adam Wolfe Gordon
Hi Austin, On Tue, Feb 14, 2012 at 10:33, Austin Clements amdra...@mit.edu wrote: The saga continues.  As for the text format, this first shifts lots of code around without changing its semantics, then it dives in and simplifies a lot of things.  Don't be put off by the number of patches;