[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jani Nikula
On Sat, 24 Jan 2015, "Jan N. Klug" wrote: > On Sat, Jan 24, 2015 at 04:21:06PM +0100, Stefano Zacchiroli wrote: >> On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: >> > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: >> > > To do the above, rewrite get_message_id() to scan the current

[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jan N. Klug
On Sat, Jan 24, 2015 at 04:21:06PM +0100, Stefano Zacchiroli wrote: > On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: > > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > > > To do the above, rewrite get_message_id() to scan the current message > > > line by line, incrementally comput

[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jani Nikula
On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > From: "Jan N. Klug" > > For those messages, compute a synthetic Message-ID based on the SHA1 > of the whole message, in the same way that notmuch would do. See: > http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c As I said on IRC, I thi

[PATCH v4 0/5] Index the content-type of MIME parts

2015-01-24 Thread David Bremner
Todd writes: > I think I've finished incorporating the feedback. The final > notmuch-search-terms.rst could use more details, but it should > probably occur after the recent patch that was posted documenting the > probablistic indexing/searching has been committed. Pushed this version, with ame

[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Stefano Zacchiroli
First of all thanks for your feedback, Jani! (both here, and the other day on IRC, of course) On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > > > > For those messages, compute a synthetic Message-ID based on the SHA1 > > of the whole

[PATCH v2 8/8] emacs: Support cid: references with shr renderer

2015-01-24 Thread Austin Clements
shr has really nice support for inline image rendering, but previously we only had the hooks for w3m cid: references. --- emacs/notmuch-show.el | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-s

[PATCH v2 7/8] emacs: Rewrite content ID handling

2015-01-24 Thread Austin Clements
Besides generally cleaning up the code and separating the general content ID handling from the w3m-specific code, this fixes several problems. Foremost is that, previously, the code roughly assumed that referenced parts would be in the same multipart/related as the reference. According to RFC 2392

[PATCH v2 6/8] emacs: Use generalized content caching in w3m CID code

2015-01-24 Thread Austin Clements
Previously this did its own caching, but this is now supported by more generally by `notmuch-get-bodypart-binary'. --- emacs/notmuch-show.el | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f29428a..11e

[PATCH v2 5/8] emacs: Support caching in notmuch-get-bodypart-{binary, text}

2015-01-24 Thread Austin Clements
(The actual code change here is small, but requires re-indenting existing code.) --- emacs/notmuch-lib.el | 64 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 3154725..f8e5165 10

[PATCH v2 4/8] emacs: Return unibyte strings for binary part data

2015-01-24 Thread Austin Clements
Unibyte strings are meant for representing binary data. In practice, using unibyte versus multibyte strings affects *almost* nothing. It does happen to matter if we use the binary data in an image descriptor (which is, helpfully, not documented anywhere and getting it wrong results in opaque erro

[PATCH v2 3/8] emacs: Remove broken `notmuch-get-bodypart-content' API

2015-01-24 Thread Austin Clements
`notmuch-get-bodypart-content' could do two very different things, depending on conditions: for text/* parts other than text/html, it would return the part content as a multibyte Lisp string *after* charset conversion, while for other parts (including text/html), it would return binary part content

[PATCH v2 2/8] emacs: Create an API for fetching parts as undecoded binary

2015-01-24 Thread Austin Clements
The new function, `notmuch-get-bodypart-binary', replaces `notmuch-get-bodypart-internal'. Whereas the old function was really meant for internal use in `notmuch-get-bodypart-content', it was used in a few other places. Since the difference between `notmuch-get-bodypart-content' and `notmuch-get-

[PATCH v2 1/8] emacs: Track full message and part descriptor in w3m CID store

2015-01-24 Thread Austin Clements
This will simplify later changes. --- emacs/notmuch-show.el | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 87b4881..df2389e 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@

[PATCH v2 0/8] Improve charset and cid: handling

2015-01-24 Thread Austin Clements
This is v2 of id:1398105468-14317-1-git-send-email-amdragon at mit.edu. This improves some comments/documentation, fixes a bug that caused cryptographic processing to not happen on HTML parts, and addresses some byte compiler warnings on Emacs 23. This version has also been rebased against the sev

[PATCH v2 4/8] emacs: Return unibyte strings for binary part data

2015-01-24 Thread Austin Clements
Unibyte strings are meant for representing binary data. In practice, using unibyte versus multibyte strings affects *almost* nothing. It does happen to matter if we use the binary data in an image descriptor (which is, helpfully, not documented anywhere and getting it wrong results in opaque erro

[PATCH v2 3/8] emacs: Remove broken `notmuch-get-bodypart-content' API

2015-01-24 Thread Austin Clements
`notmuch-get-bodypart-content' could do two very different things, depending on conditions: for text/* parts other than text/html, it would return the part content as a multibyte Lisp string *after* charset conversion, while for other parts (including text/html), it would return binary part content

[PATCH v2 2/8] emacs: Create an API for fetching parts as undecoded binary

2015-01-24 Thread Austin Clements
The new function, `notmuch-get-bodypart-binary', replaces `notmuch-get-bodypart-internal'. Whereas the old function was really meant for internal use in `notmuch-get-bodypart-content', it was used in a few other places. Since the difference between `notmuch-get-bodypart-content' and `notmuch-get-

[PATCH v2 8/8] emacs: Support cid: references with shr renderer

2015-01-24 Thread Austin Clements
shr has really nice support for inline image rendering, but previously we only had the hooks for w3m cid: references. --- emacs/notmuch-show.el | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-s

[PATCH v2 5/8] emacs: Support caching in notmuch-get-bodypart-{binary, text}

2015-01-24 Thread Austin Clements
(The actual code change here is small, but requires re-indenting existing code.) --- emacs/notmuch-lib.el | 64 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 3154725..f8e5165 10

[PATCH v2 0/8] Improve charset and cid: handling

2015-01-24 Thread Austin Clements
This is v2 of id:1398105468-14317-1-git-send-email-amdra...@mit.edu. This improves some comments/documentation, fixes a bug that caused cryptographic processing to not happen on HTML parts, and addresses some byte compiler warnings on Emacs 23. This version has also been rebased against the severa

[PATCH v2 6/8] emacs: Use generalized content caching in w3m CID code

2015-01-24 Thread Austin Clements
Previously this did its own caching, but this is now supported by more generally by `notmuch-get-bodypart-binary'. --- emacs/notmuch-show.el | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f29428a..11e

[PATCH v2 1/8] emacs: Track full message and part descriptor in w3m CID store

2015-01-24 Thread Austin Clements
This will simplify later changes. --- emacs/notmuch-show.el | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 87b4881..df2389e 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@

[PATCH 08/11] emacs: Support caching in notmuch-get-bodypart-{binary, text}

2015-01-24 Thread Austin Clements
On Fri, 25 Apr 2014, Mark Walters wrote: > On Thu, 24 Apr 2014, Austin Clements wrote: >> Quoth Mark Walters on Apr 24 at 11:46 am: >>> >>> On Mon, 21 Apr 2014, Austin Clements wrote: >>> > (The actual code change here is small, but requires re-indenting >>> > existing code.) >>> > --- >>> > e

[PATCH 00/11] Improve charset and cid: handling

2015-01-24 Thread Austin Clements
I added declare-functions for both of these, which should take care of the Emacs 23 warnings and be more robust on Emacs 24. We can't reach the function that calls these unless shr is actually available, but the byte compiler doesn't know that. On Sat, 26 Apr 2014, Mark Walters wrote: > Aside fr

[PATCH 11/11] emacs: Support cid: references with shr renderer

2015-01-24 Thread Austin Clements
On Thu, 01 May 2014, David Edmondson wrote: > On Mon, Apr 21 2014, Austin Clements wrote: >> +(defun notmuch-show--insert-part-text/html-shr (msg part) >> + ;; Make sure shr is loaded before we start let-binding its globals >> + (require 'shr) >> + (let ((dom (let (process-crypto notmuch-show-p

[PATCH 06/11] emacs: Remove broken `notmuch-get-bodypart-content' API

2015-01-24 Thread Austin Clements
On Fri, 11 Jul 2014, David Bremner wrote: > Austin Clements writes: > >> +This returns the content of the given part as a multibyte Lisp > > What does "multibyte" mean here? utf8? current encoding? Elisp has two kinds of stings: "unibyte strings" and "multibyte strings". https://www.gnu.org/

Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jani Nikula
On Sat, 24 Jan 2015, "Jan N. Klug" wrote: > On Sat, Jan 24, 2015 at 04:21:06PM +0100, Stefano Zacchiroli wrote: >> On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: >> > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: >> > > To do the above, rewrite get_message_id() to scan the current

[PATCH 04/11] emacs: Track full message and part descriptor in w3m CID store

2015-01-24 Thread Austin Clements
On Thu, 10 Jul 2014, David Bremner wrote: > Austin Clements writes: > >> This will simplify later changes. > > I'd have preferred the whitespace changes as a seperate patch, but OK. Not sure which whitespace changes you're referring to. Everything in this diff is actual (minor) code changes.

[LATE NIGHT PATCH] build gzipped apidoc in case have doxygen but not sphinx

2015-01-24 Thread David Bremner
David Bremner writes: > Tomi Ollila writes: > >> In case we had doxygen but not sphinx notmuch.3 was created but >> notmuch.3.gz not -- which means install fails! >> This patch (with late night unpolished commit message will fix that) > > By install fails, you mean the man page is simply not ins

[PATCH 3/3] debian packaging: drop dep notmuch-mutt -> libmailtools-perl

2015-01-24 Thread Stefano Zacchiroli
Rationale: the dependency is no longer needed after the rewrite of get_message_id(). Note that Digest::SHA, needed by the new implementation of get_message_id(), is shipped by the perl package itself, which is in an implied dependency of other lib*-perl packages. So there is no need to list perl e

[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Stefano Zacchiroli
From: "Jan N. Klug" For those messages, compute a synthetic Message-ID based on the SHA1 of the whole message, in the same way that notmuch would do. See: http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c To do the above, rewrite get_message_id() to scan the current message line by li

[PATCH 1/3] notmuch-mutt README: use metacpn.org/* as deps homepages

2015-01-24 Thread Stefano Zacchiroli
--- contrib/notmuch-mutt/README | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-mutt/README b/contrib/notmuch-mutt/README index 382ac91..c661447 100644 --- a/contrib/notmuch-mutt/README +++ b/contrib/notmuch-mutt/README @@ -33,13 +33,13 @@ Requirements

[PATCH] notmuch-mutt: support for messages that lack Message-ID

2015-01-24 Thread Stefano Zacchiroli
Please find attached a patch series that add support for messages that lack Message-ID to notmuch-mutt, kindly provided by Jan N. Klug. I've reviewed / adapted it, and I consider it suitable for inclusion into the next release of notmuch(-mutt). Please let me know if you've any question. Cheers.

Re: [PATCH 08/11] emacs: Support caching in notmuch-get-bodypart-{binary, text}

2015-01-24 Thread Austin Clements
On Fri, 25 Apr 2014, Mark Walters wrote: > On Thu, 24 Apr 2014, Austin Clements wrote: >> Quoth Mark Walters on Apr 24 at 11:46 am: >>> >>> On Mon, 21 Apr 2014, Austin Clements wrote: >>> > (The actual code change here is small, but requires re-indenting >>> > existing code.) >>> > --- >>> > e

[LATE NIGHT PATCH] build gzipped apidoc in case have doxygen but not sphinx

2015-01-24 Thread David Bremner
Tomi Ollila writes: > In case we had doxygen but not sphinx notmuch.3 was created but > notmuch.3.gz not -- which means install fails! > This patch (with late night unpolished commit message will fix that) By install fails, you mean the man page is simply not installed? I agree that's a bug, but

[PATCH] emacs: escape % in header line format

2015-01-24 Thread David Bremner
David Bremner writes: > Jinwoo Lee writes: > >> Yup. It works! Thanks for the quick fix. Is this going to be merged >> to HEAD soon? >> > > Probably in the next day or so, unless somebody complains. This bug should be fixed in commit cc3d25d d

Re: [PATCH 00/11] Improve charset and cid: handling

2015-01-24 Thread Austin Clements
I added declare-functions for both of these, which should take care of the Emacs 23 warnings and be more robust on Emacs 24. We can't reach the function that calls these unless shr is actually available, but the byte compiler doesn't know that. On Sat, 26 Apr 2014, Mark Walters wrote: > Aside fr

Re: [PATCH 11/11] emacs: Support cid: references with shr renderer

2015-01-24 Thread Austin Clements
On Thu, 01 May 2014, David Edmondson wrote: > On Mon, Apr 21 2014, Austin Clements wrote: >> +(defun notmuch-show--insert-part-text/html-shr (msg part) >> + ;; Make sure shr is loaded before we start let-binding its globals >> + (require 'shr) >> + (let ((dom (let (process-crypto notmuch-show-p

Re: [PATCH 06/11] emacs: Remove broken `notmuch-get-bodypart-content' API

2015-01-24 Thread Austin Clements
On Fri, 11 Jul 2014, David Bremner wrote: > Austin Clements writes: > >> +This returns the content of the given part as a multibyte Lisp > > What does "multibyte" mean here? utf8? current encoding? Elisp has two kinds of stings: "unibyte strings" and "multibyte strings". https://www.gnu.org/

Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jan N. Klug
On Sat, Jan 24, 2015 at 04:21:06PM +0100, Stefano Zacchiroli wrote: > On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: > > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > > > To do the above, rewrite get_message_id() to scan the current message > > > line by line, incrementally comput

Re: [PATCH 04/11] emacs: Track full message and part descriptor in w3m CID store

2015-01-24 Thread Austin Clements
On Thu, 10 Jul 2014, David Bremner wrote: > Austin Clements writes: > >> This will simplify later changes. > > I'd have preferred the whitespace changes as a seperate patch, but OK. Not sure which whitespace changes you're referring to. Everything in this diff is actual (minor) code changes. __

Re: [PATCH v4 0/5] Index the content-type of MIME parts

2015-01-24 Thread David Bremner
Todd writes: > I think I've finished incorporating the feedback. The final > notmuch-search-terms.rst could use more details, but it should > probably occur after the recent patch that was posted documenting the > probablistic indexing/searching has been committed. Pushed this version, with ame

Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Stefano Zacchiroli
First of all thanks for your feedback, Jani! (both here, and the other day on IRC, of course) On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote: > On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > > > > For those messages, compute a synthetic Message-ID based on the SHA1 > > of the whole

Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Jani Nikula
On Sat, 24 Jan 2015, Stefano Zacchiroli wrote: > From: "Jan N. Klug" > > For those messages, compute a synthetic Message-ID based on the SHA1 > of the whole message, in the same way that notmuch would do. See: > http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c As I said on IRC, I thi

Re: [LATE NIGHT PATCH] build gzipped apidoc in case have doxygen but not sphinx

2015-01-24 Thread David Bremner
David Bremner writes: > Tomi Ollila writes: > >> In case we had doxygen but not sphinx notmuch.3 was created but >> notmuch.3.gz not -- which means install fails! >> This patch (with late night unpolished commit message will fix that) > > By install fails, you mean the man page is simply not ins

[PATCH 1/3] notmuch-mutt README: use metacpn.org/* as deps homepages

2015-01-24 Thread Stefano Zacchiroli
--- contrib/notmuch-mutt/README | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-mutt/README b/contrib/notmuch-mutt/README index 382ac91..c661447 100644 --- a/contrib/notmuch-mutt/README +++ b/contrib/notmuch-mutt/README @@ -33,13 +33,13 @@ Requirements

[PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

2015-01-24 Thread Stefano Zacchiroli
From: "Jan N. Klug" For those messages, compute a synthetic Message-ID based on the SHA1 of the whole message, in the same way that notmuch would do. See: http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c To do the above, rewrite get_message_id() to scan the current message line by li

[PATCH] notmuch-mutt: support for messages that lack Message-ID

2015-01-24 Thread Stefano Zacchiroli
Please find attached a patch series that add support for messages that lack Message-ID to notmuch-mutt, kindly provided by Jan N. Klug. I've reviewed / adapted it, and I consider it suitable for inclusion into the next release of notmuch(-mutt). Please let me know if you've any question. Cheers.

[PATCH 3/3] debian packaging: drop dep notmuch-mutt -> libmailtools-perl

2015-01-24 Thread Stefano Zacchiroli
Rationale: the dependency is no longer needed after the rewrite of get_message_id(). Note that Digest::SHA, needed by the new implementation of get_message_id(), is shipped by the perl package itself, which is in an implied dependency of other lib*-perl packages. So there is no need to list perl e

Re: [LATE NIGHT PATCH] build gzipped apidoc in case have doxygen but not sphinx

2015-01-24 Thread David Bremner
Tomi Ollila writes: > In case we had doxygen but not sphinx notmuch.3 was created but > notmuch.3.gz not -- which means install fails! > This patch (with late night unpolished commit message will fix that) By install fails, you mean the man page is simply not installed? I agree that's a bug, but

Re: [PATCH] emacs: escape % in header line format

2015-01-24 Thread David Bremner
David Bremner writes: > Jinwoo Lee writes: > >> Yup. It works! Thanks for the quick fix. Is this going to be merged >> to HEAD soon? >> > > Probably in the next day or so, unless somebody complains. This bug should be fixed in commit cc3d25d d ___