Re: [PATCH v2] Add notmuch-show--build-queries.

2016-10-13 Thread Mark Walters
On Tue, 11 Oct 2016, Matt Armstrong wrote: > notmuch-show--build-buffer now queries a list of queries built by the > former. This simplifies the logic. It also provides an easy place to > experiment with alternate sets of queries for given notmuch-show-* > variables (e.g. users can use advice-a

Re: Status of Vim client

2016-10-13 Thread David Bremner
Nick Howell writes: > Nick Howell wrote: >> I have a few patchsets adding: > >> - attachment support in compose >> - mailcap support for multipart messages > > Mildly clean (imo), independent versions of these have been sent to > the mailing list; they are meant to be applied on-top of felipec's

Re: Status of Vim client

2016-10-13 Thread nlhowell
David Bremner wrote: > Nick Howell writes: > > Nick Howell wrote: > >> I have a few patchsets adding: > > > >> - attachment support in compose - mailcap support for multipart > >> messages > > > > Mildly clean (imo), independent versions of these have been sent > > to the mailing list; they are me

Re: [PATCH v2] Add notmuch-show--build-queries.

2016-10-13 Thread Matt Armstrong
Mark, thanks for the review. I agree with your comments. I'll send another patch. As you might guess, I'm new to elisp. Use of push makes some of this fall out nicely. For what it is worth, I did experiment with using loop to find the first functional "forest". There are several other calls t

[no subject]

2016-10-13 Thread Matt Armstrong
This supercedes id:1476207707-21827-1-git-send-email-marmstr...@google.com with changes steming from Mark's helpful feedback. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3] Add notmuch-show--build-queries.

2016-10-13 Thread Matt Armstrong
notmuch-show--build-buffer now queries a list of queries built by the former. This simplifies the logic. It also provides an easy place to experiment with alternate sets of queries for given notmuch-show-* variables (e.g. users can use advice-add to do so in a surgical way). --- emacs/notmuch-sh

Re:

2016-10-13 Thread Matt Armstrong
Matt Armstrong writes: > This supercedes > id:1476207707-21827-1-git-send-email-marmstr...@google.com with > changes steming from Mark's helpful feedback. Apologies for the lack of a subject here. I'm still learning the ins and outs of 'git send-email'. I can't say I'd call it a friendly facil

Re: Status of Vim client

2016-10-13 Thread David Bremner
nlhow...@gmail.com writes: > I assumed they were getting moderated, but perhaps they got dropped? Tomi can you check that possibility? It seems unlikely, given the other messages are getting through, but who knows what evil lurks in the heart of Mailman. d _

Re: [PATCH] Expand docstrings about fcc using notmuch-insert

2016-10-13 Thread Keith Amidon
Did my attempt to submit via git send-email the documentation patch quoted below somehow not get forwarded by the list server? I never got a copy forwarded by the list but just assumed that it was suppressing copies to the authors. Having observed that folks here are usually very good about revie

Re: [PATCH] Expand docstrings about fcc using notmuch-insert

2016-10-13 Thread David Bremner
Keith Amidon writes: > Did my attempt to submit via git send-email the documentation patch > quoted below somehow not get forwarded by the list server? I never got > a copy forwarded by the list but just assumed that it was suppressing > copies to the authors. Having observed that folks here ar

Re: [PATCH] Expand docstrings about fcc using notmuch-insert

2016-10-13 Thread Keith Amidon
On Thu, 2016-10-13 at 22:30 -0300, David Bremner wrote: > No technical difficulties, we're just not as good as you think we are > at quick reviews ;). I wanted to hear what Mark felt about exposing > these internals as docstring. I OK with it, but it does make it > slightly harder to change things

[RFC PATCH 0/2] vim: add "attach" support to compose

2016-10-13 Thread Nick Howell
The following is a pair of patches implementing an "attach" action for compose mode. The first patch reorganizes the code for the magic "Notmuch-" headers used in compose mode. The second patch adds a magic Notmuch-Attach header, maps an input() helper to add the header, and adds logic to proces

[RFC PATCH 2/2] vim: compose: attachment support

2016-10-13 Thread Nick Howell
Adds attachment support through the mail gem. Notmuch-Attach headers list files which are added to the message before sending. Files are added by constructing a new post-processed transport Mail object using the Notmuch-Attach header and the original Mail object. Any attachments added (say by hand

[RFC PATCH 1/2] vim: compose: support additional Notmuch- filters

2016-10-13 Thread Nick Howell
Add support for additional Notmuch-* headers: special headers read (and then removed) by vnm upon send. The plan is to use these special headers for all sorts of fancy features: attachments, PGP, whatever, so that the inputs to these features are editable from vim. For the moment, this just factor

[RFC PATCH 0/7] vim: add mailcap filtering to show

2016-10-13 Thread Nick Howell
This patch series adds the ability to display parts with non-plaintext mime types. It uses the mailcap facility (see the commit message for the first patch) to transform to plaintext. The latter patches add special handling for multipart/alternative (instead of just treating it as multipart/mixed).

[RFC PATCH 1/7] vim: show: add mailcap filtering

2016-10-13 Thread Nick Howell
Add mailcap filters, which allow us to display multiple parts. See http://packages.debian.org/unstable/net/mime-support for details on run-mailcap, the mailcap program we default to; the TLDR is that mailcap is a program which accepts a mimetype argument, looks up a translation program based on th

[RFC PATCH 7/7] vim: mailcap: handle mailcap failure gracefully

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 8 1 file changed, 8 insertions(+) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index da747eb..e9baeff 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -370,6 +370,14 @@ ruby << EOF io.each_line do |l|

[RFC PATCH 6/7] vim: mailcap: show all alternatives if none preferred

2016-10-13 Thread Nick Howell
Display all parts of a multipart/alternative message (or message-part) if no alternative_preference matches any of the alternative mimetypes. E.g. if a message is multipart/alternative with options text/plain and text/html, and the alternative_preference is ['application/pdf'], no preference optio

[RFC PATCH 4/7] vim: mailcap: don't corrupt the view if filters write to stderr

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index 89fa2dc..a20dd86 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -347,7 +347,7 @@ ruby << EOF parts.each do |part|

[RFC PATCHv2 1/8] vim: show: add mailcap filtering

2016-10-13 Thread Nick Howell
Add mailcap filters, which allow us to display multiple parts. See http://packages.debian.org/unstable/net/mime-support for details on run-mailcap, the mailcap program we default to; the TLDR is that mailcap is a program which accepts a mimetype argument, looks up a translation program based on th

[RFC PATCH 2/7] vim: mailcap: forbid access to display server

2016-10-13 Thread Nick Howell
Default to prevent mailcap from accessing the display server. Potential concerns: a malicious .mailcap file + attachment could read your keystrokes, or if the .mailcap file is non-malicious, an attachment exploiting a vulnerability in your mailcap viewer. In principle we should probably try to run

[RFC PATCH 5/7] vim: mailcap: redraw after processing

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index a20dd86..5cb8d20 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -370,6 +370,7 @@ ruby << EOF VIM::command("syntax region nmShowMsg#{i}Body start='\\%%%il' end='\\

[RFC PATCH 3/7] vim: mailcap: gracefully handle missing mimetype

2016-10-13 Thread Nick Howell
Some plaintext messages do not specify a mimetype. Instead of failing in this situation, just assume the part is plaintext. (Maybe a better strategy would be to check if the message contains non-unicode first?) --- vim/notmuch.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[RFC PATCHv2 3/8] vim: mailcap: gracefully handle missing mimetype

2016-10-13 Thread Nick Howell
Some plaintext messages do not specify a mimetype. Instead of failing in this situation, just assume the part is plaintext. (Maybe a better strategy would be to check if the message contains non-unicode first?) --- vim/notmuch.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[RFC PATCHv2 4/8] vim: mailcap: don't corrupt the view if filters write to stderr

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index 89fa2dc..a20dd86 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -347,7 +347,7 @@ ruby << EOF parts.each do |part|

[RFC PATCHv2 6/8] vim: show: add multipart/alternative picking

2016-10-13 Thread Nick Howell
Instead of just blindly showing every part of multipart/*, add special handling for multipart/alternative (which is designed for alternative content-types containing the same message). Two new preferences are added: - g:notmuch_multipart_alternative_display = "best-only" (default)

[RFC PATCHv2 2/8] vim: mailcap: forbid access to display server

2016-10-13 Thread Nick Howell
Default to prevent mailcap from accessing the display server. Potential concerns: a malicious .mailcap file + attachment could read your keystrokes, or if the .mailcap file is non-malicious, an attachment exploiting a vulnerability in your mailcap viewer. In principle we should probably try to run

[RFC PATCHv2 5/8] vim: mailcap: redraw after processing

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index a20dd86..5cb8d20 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -370,6 +370,7 @@ ruby << EOF VIM::command("syntax region nmShowMsg#{i}Body start='\\%%%il' end='\\

[RFC PATCHv2 0/8] vim: add mailcap filtering to show

2016-10-13 Thread Nick Howell
This patch series adds the ability to display parts with non-plaintext mime types. It uses the mailcap facility (see the commit message for the first patch) to transform to plaintext. The latter patches add special handling for multipart/alternative (instead of just treating it as multipart/mixed).

[RFC PATCHv2 8/8] vim: mailcap: handle mailcap failure gracefully

2016-10-13 Thread Nick Howell
--- vim/notmuch.vim | 6 ++ 1 file changed, 6 insertions(+) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index cdcaa5f..79a0e27 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -374,6 +374,12 @@ ruby << EOF io.each_line do |l|

[RFC PATCHv2 7/8] vim: mailcap: show all alternatives if none preferred

2016-10-13 Thread Nick Howell
Display all parts of a multipart/alternative message (or message-part) if no alternative_preference matches any of the alternative mimetypes. E.g. if a message is multipart/alternative with options text/plain and text/html, and the alternative_preference is ['application/pdf'], no preference optio

Re: [PATCH] Expand docstrings about fcc using notmuch-insert

2016-10-13 Thread Mark Walters
Hi Many thanks for doing this (and bringing this to out attention). I have a couple of minor suggestions for tweaking what you have written, but I am not certain they are improvements, so comments gratefully received. On Tue, 11 Oct 2016, Keith Amidon wrote: > This commit expands docstrings for