Re: [PATCH v1] emacs: Improved header display.

2014-10-31 Thread David Edmondson
On Thu, Oct 30 2014, Jani Nikula wrote: On Thu, 30 Oct 2014, David Edmondson d...@dme.org wrote: Truncate the displayed headers to the window width. Show an ellipsis if the displayed header is truncated. Add a binding 'T' to toggle the truncation of headers. Add the not-displayed section of

Re: [PATCH] cli: add support for notmuch search --duplicate=N with --output=messages

2014-10-31 Thread David Edmondson
On Thu, Oct 30 2014, Jani Nikula wrote: Print the message IDs of all messages matching the search terms that have at least N files associated with them. Briefly tested as working. I commend this patch to the masters of push. Thanks Jani! --- doc/man1/notmuch-search.rst | 12

Re: search --path=directory/ is lame(-ish)

2014-10-31 Thread David Bremner
David Edmondson d...@dme.org writes: Could we always prune a trailing slash from the path: component of a query before using it? As I understand it, this is complicated by the fact that we pass the whole string to Xapian to be parsed as a query, so we don't really know where the path: terms

[PATCH v1 0/2] emacs: Improve notmuch-wash customisation.

2014-10-31 Thread David Edmondson
emacs: Improve notmuch-wash customisation. Minor updates to the customisation of notmuch-wash features. David Edmondson (2): emacs: More flexible washed faces. emacs: Washing should use more `defcustom'. emacs/notmuch-wash.el | 109 +++--- 1

[PATCH v1 1/2] emacs: More flexible washed faces.

2014-10-31 Thread David Edmondson
The faces used when washing messages should be notmuch specific and inherit from the underlying emacs face rather than using it directly. This allows the washed face to be modified without requiring the modification of the underlying face. --- emacs/notmuch-wash.el | 21 +++-- 1

[PATCH v1 2/2] emacs: Washing should use more `defcustom'.

2014-10-31 Thread David Edmondson
More of the washing variables should be available through the standard customisation interface. --- emacs/notmuch-wash.el | 88 +-- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
On Thu, 30 Oct 2014, Michal Sojka sojk...@fel.cvut.cz wrote: Hi all, this is v5 of the search --output=address series. It obsoletes v4 (id:1414421455-3037-1-git-send-email-sojk...@fel.cvut.cz). I addresses comments from Mark and Tomi. Based on the comments to v4 and earlier versions,

[RFC] [PATCH v1] emacs: More citation washing.

2014-10-31 Thread David Edmondson
Ensure that a citation is preceded and followed by a blank line, unless the preceding line looks like a citation leader. --- Washing changes are always a bit risky, as they are heuristic based. Testers for this (alleged) improvement welcome! emacs/notmuch-wash.el | 14 +- 1 file

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
Hi I attach a patch which does the quoting for real names but I don't know if we want it: it changes (example taken from the test suite) François Boulogne to =?iso-8859-1?q?Fran=E7ois?= Boulogne (which is what was in the original email) Plausibly the best thing is just to leave the series as

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
On Fri, Oct 31 2014, Mark Walters wrote: My only query is in the text output: should the name part be printed as a quoted string. For example currently I get a line of the form Bloggs, Fred f...@example.com Good point. On Fri, Oct 31 2014, Mark Walters wrote: Hi I attach a patch which

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
On Fri, Oct 31 2014, Jesse Rosenthal wrote: Dear Michal, Thanks for all this. The feature looks great! One issue: I'm getting corrupt output when using `--output=count` with fold filters: ~~~ jkr@ladybug [11:01AM] ~ $ notmuch search --output=recipients --output=count tag:notmuch and

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Jesse Rosenthal
Dear Michal, Thanks for all this. The feature looks great! One issue: I'm getting corrupt output when using `--output=count` with fold filters: ~~~ jkr@ladybug [11:01AM] ~ $ notmuch search --output=recipients --output=count tag:notmuch and date:today.. 2 Jani Nikula j...@nikula.org 2

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Tomi Ollila
On Fri, Oct 31 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On Fri, Oct 31 2014, Mark Walters wrote: My only query is in the text output: should the name part be printed as a quoted string. For example currently I get a line of the form Bloggs, Fred f...@example.com Good point. There has

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
Hi On Fri, 31 Oct 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On Fri, Oct 31 2014, Mark Walters wrote: My only query is in the text output: should the name part be printed as a quoted string. For example currently I get a line of the form Bloggs, Fred f...@example.com Good point. On

Re: [PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
On Fri, 31 Oct 2014, Tomi Ollila tomi.oll...@iki.fi wrote: On Fri, Oct 31 2014, Michal Sojka sojk...@fel.cvut.cz wrote: On Fri, Oct 31 2014, Mark Walters wrote: My only query is in the text output: should the name part be printed as a quoted string. For example currently I get a line of the

Re: [PATCH] test: use LDFLAGS in test/Makefile.local

2014-10-31 Thread David Bremner
Jani Nikula j...@nikula.org writes: Apparently the test binaries are built with minimal LDFLAGS, only adding dependency specific LDFLAGS as needed. However because some of the test binaries incorporate notmuch object files, it is necessary to use the same link flags as notmuch. For example

[PATCH v1] NEWS: Improved `q` binding.

2014-10-31 Thread David Edmondson
--- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 4718838..723bca0 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,12 @@ Expanded default saved search settings The default saved searches now include several more common searches, as well as shortcut keys for

[PATCH] test: Make gen-threads work with python3

2014-10-31 Thread Jesse Rosenthal
python3 doesn't allow dictionaries to be initialized with non-string keywords. This presents problems on systems in which python means python3. We instead initalize the dictionary using the dict comprehension and then update it with the values from the tree. This will work with both python2 and

Re: [PATCH] test: Make gen-threads work with python3

2014-10-31 Thread W. Trevor King
On Fri, Oct 31, 2014 at 01:33:25PM -0400, Jesse Rosenthal wrote: We instead initalize the dictionary using the dict comprehension and then update it with the values from the tree. This will work with both python2 and python3. Dict comprehensions are new in 2.7 [1,2], so this drops support for

Re: [PATCH] test: Make gen-threads work with python3

2014-10-31 Thread W. Trevor King
On Fri, Oct 31, 2014 at 02:04:50PM -0400, Jesse Rosenthal wrote: W. Trevor King writes: On Fri, Oct 31, 2014 at 01:33:25PM -0400, Jesse Rosenthal wrote: We instead initalize the dictionary using the dict comprehension and then update it with the values from the tree. This will work with

Re: [PATCH] test: Make gen-threads work with python3

2014-10-31 Thread Jesse Rosenthal
W. Trevor King wk...@tremily.us writes: On Fri, Oct 31, 2014 at 01:33:25PM -0400, Jesse Rosenthal wrote: We instead initalize the dictionary using the dict comprehension and then update it with the values from the tree. This will work with both python2 and python3. Dict comprehensions are

[PATCH v6 1/7] cli: search: Refactor passing of command line options

2014-10-31 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following commits. --- notmuch-search.c | 125

[PATCH v6 4/7] cli: search: Add --output={sender,recipients}

2014-10-31 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. To print both, the user can use --output=sender and --output=recipients simultaneously. Currently, the same address can appear multiple times in the output. The next commit will change this. For this reason, tests

[PATCH v6 7/7] cli: search: Add --filter-by option to configure address filtering

2014-10-31 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v6 5/7] cli: search: Do not output duplicate addresses

2014-10-31 Thread Michal Sojka
This filters out duplicate addresses from address outputs (sender, receivers). It also also adds tests for the new outputs. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-search.rst | 2 ++ notmuch-search.c| 51 ++

[PATCH v6 6/7] cli: search: Add --output=count

2014-10-31 Thread Michal Sojka
This output can be used with --output=recipients or --output=sender and in addition to the addresses, it prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-search.rst

[PATCH v6 2/7] cli: Add support for parsing keyword-flag arguments

2014-10-31 Thread Michal Sojka
From: Jani Nikula j...@nikula.org This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 +

Re: [PATCH v6 6/7] cli: search: Add --output=count

2014-10-31 Thread Mark Walters
On Fri, 31 Oct 2014, Michal Sojka sojk...@fel.cvut.cz wrote: This output can be used with --output=recipients or --output=sender and in addition to the addresses, it prints how many times was each address encountered during search. Hi I have a couple comments on this patch. ---

[PATCH] cli: add support for notmuch search --duplicate=N with --output=messages

2014-10-31 Thread Jani Nikula
Print the message IDs of all messages matching the search terms that have at least N files associated with them. --- doc/man1/notmuch-search.rst | 12 notmuch-search.c| 34 ++ 2 files changed, 38 insertions(+), 8 deletions(-) diff --git

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
Hi all, this is v5 of the search --output=address series. It obsoletes v4 (id:1414421455-3037-1-git-send-email-sojkam1 at fel.cvut.cz). I addresses comments from Mark and Tomi. Based on the comments to v4 and earlier versions, patches 1-4 should be ready for merging. Patch 5 is a

[PATCH v5 2/7] cli: Add support for parsing keyword-flag arguments

2014-10-31 Thread Michal Sojka
From: Jani Nikula This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 +

[PATCH v5 3/7] cli: search: Convert --output to keyword-flag argument

2014-10-31 Thread Michal Sojka
This converts "notmuch search" to use the recently introduced keyword-flag argument parser. At this point, it only makes the code slightly less readable but following commits that add new --output keywords will profit from this. --- notmuch-search.c | 35 ++- 1

[PATCH v5 1/7] cli: search: Refactor passing of command line options

2014-10-31 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following commits. --- notmuch-search.c | 125

[PATCH v5 4/7] cli: search: Add --output={sender,recipients}

2014-10-31 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. To print both, the user can use --output=sender and --output=recipients simultaneously. Currently, the same address can appear multiple times in the output. The next commit will change this. For this reason, tests

[PATCH v5 6/7] cli: search: Add --output=count

2014-10-31 Thread Michal Sojka
This output can be used with --output=recipients or --output=sender and in addition to the addresses, it prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-search.rst

[PATCH v5 5/7] cli: search: Do not output duplicate addresses

2014-10-31 Thread Michal Sojka
This filters out duplicate addresses from address outputs (sender, receivers). It also also adds tests for the new outputs. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-search.rst | 2 ++ notmuch-search.c| 51 ++

[PATCH v5 7/7] cli: search: Add --filter-by option to configure address filtering

2014-10-31 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v1] emacs: Improved header display.

2014-10-31 Thread David Edmondson
On Thu, Oct 30 2014, Jani Nikula wrote: > On Thu, 30 Oct 2014, David Edmondson wrote: >> Truncate the displayed headers to the window width. Show an ellipsis >> if the displayed header is truncated. Add a binding 'T' to toggle the >> truncation of headers. Add the not-displayed section of the

[PATCH] cli: add support for notmuch search --duplicate=N with --output=messages

2014-10-31 Thread David Edmondson
On Thu, Oct 30 2014, Jani Nikula wrote: > Print the message IDs of all messages matching the search terms that > have at least N files associated with them. Briefly tested as working. I commend this patch to the masters of push. Thanks Jani! > --- > doc/man1/notmuch-search.rst | 12

"search --path=directory/" is lame(-ish)

2014-10-31 Thread David Bremner
David Edmondson writes: > > Could we always prune a trailing slash from the path: component of a > query before using it? > As I understand it, this is complicated by the fact that we pass the whole string to Xapian to be parsed as a query, so we don't really know where the path: terms are. We

[PATCH v1 1/2] emacs: More flexible washed faces.

2014-10-31 Thread David Edmondson
The faces used when washing messages should be notmuch specific and inherit from the underlying emacs face rather than using it directly. This allows the washed face to be modified without requiring the modification of the underlying face. --- emacs/notmuch-wash.el | 21 +++-- 1

[PATCH v1 0/2] emacs: Improve notmuch-wash customisation.

2014-10-31 Thread David Edmondson
emacs: Improve notmuch-wash customisation. Minor updates to the customisation of notmuch-wash features. David Edmondson (2): emacs: More flexible washed faces. emacs: Washing should use more `defcustom'. emacs/notmuch-wash.el | 109 +++--- 1

[PATCH v1 2/2] emacs: Washing should use more `defcustom'.

2014-10-31 Thread David Edmondson
More of the washing variables should be available through the standard customisation interface. --- emacs/notmuch-wash.el | 88 +-- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
On Thu, 30 Oct 2014, Michal Sojka wrote: > Hi all, > > this is v5 of the search --output=address series. It obsoletes v4 > (id:1414421455-3037-1-git-send-email-sojkam1 at fel.cvut.cz). > > I addresses comments from Mark and Tomi. Based on the comments to v4 > and earlier versions, patches 1-4

[RFC] [PATCH v1] emacs: More citation washing.

2014-10-31 Thread David Edmondson
Ensure that a citation is preceded and followed by a blank line, unless the preceding line looks like a citation leader. --- Washing changes are always a bit risky, as they are heuristic based. Testers for this (alleged) improvement welcome! emacs/notmuch-wash.el | 14 +- 1 file

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
Type: text/x-diff Size: 3436 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20141031/2f486f4f/attachment-0001.patch>

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
On Fri, Oct 31 2014, Mark Walters wrote: > My only query is in the text output: should the name part be printed as > a quoted string. For example currently I get a line of the form > > Bloggs, Fred Good point. On Fri, Oct 31 2014, Mark Walters wrote: > Hi > > I attach a patch which does the

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
On Fri, Oct 31 2014, Jesse Rosenthal wrote: > Dear Michal, > > Thanks for all this. The feature looks great! One issue: I'm getting > corrupt output when using `--output=count` with "fold" filters: > > ~~~ > jkr at ladybug [11:01AM] ~ $ notmuch search --output=recipients > --output=count

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Jesse Rosenthal
Dear Michal, Thanks for all this. The feature looks great! One issue: I'm getting corrupt output when using `--output=count` with "fold" filters: ~~~ jkr at ladybug [11:01AM] ~ $ notmuch search --output=recipients --output=count "tag:notmuch and date:today.." 2 Jani Nikula 2

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Tomi Ollila
On Fri, Oct 31 2014, Michal Sojka wrote: > On Fri, Oct 31 2014, Mark Walters wrote: >> My only query is in the text output: should the name part be printed as >> a quoted string. For example currently I get a line of the form >> >> Bloggs, Fred > > Good point. There has been some discussion on

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
Hi On Fri, 31 Oct 2014, Michal Sojka wrote: > On Fri, Oct 31 2014, Mark Walters wrote: >> My only query is in the text output: should the name part be printed as >> a quoted string. For example currently I get a line of the form >> >> Bloggs, Fred > > Good point. > > On Fri, Oct 31 2014, Mark

[PATCH v5 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Mark Walters
On Fri, 31 Oct 2014, Tomi Ollila wrote: > On Fri, Oct 31 2014, Michal Sojka wrote: > >> On Fri, Oct 31 2014, Mark Walters wrote: >>> My only query is in the text output: should the name part be printed as >>> a quoted string. For example currently I get a line of the form >>> >>> Bloggs, Fred

[PATCH v2] emacs: Improve the behaviour of the 'q' binding.

2014-10-31 Thread David Bremner
David Edmondson writes: > When a user hits 'q' in a notmuch buffer, kill the buffer only if > there are no other windows currently showing it. pushed. That probably deserves a NEWS patch. d

[PATCH] test: use LDFLAGS in test/Makefile.local

2014-10-31 Thread David Bremner
Jani Nikula writes: > Apparently the test binaries are built with minimal LDFLAGS, only > adding dependency specific LDFLAGS as needed. However because some of > the test binaries incorporate notmuch object files, it is necessary to > use the same link flags as notmuch. For example user provided

[PATCH v1] NEWS: Improved `q` binding.

2014-10-31 Thread David Edmondson
--- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 4718838..723bca0 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,12 @@ Expanded default saved search settings The default saved searches now include several more common searches, as well as shortcut keys for

[PATCH] test: Make gen-threads work with python3

2014-10-31 Thread Jesse Rosenthal
python3 doesn't allow dictionaries to be initialized with non-string keywords. This presents problems on systems in which "python" means "python3". We instead initalize the dictionary using the dict comprehension and then update it with the values from the tree. This will work with both python2

[PATCH] test: Make gen-threads work with python3

2014-10-31 Thread W. Trevor King
encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20141031/bb8e1c9b/attachment.pgp>

[PATCH] test: Make gen-threads work with python3

2014-10-31 Thread W. Trevor King
.. Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20141031/4d4eaff3/attachment-0001.pgp>

[PATCH] test: Make gen-threads work with python3

2014-10-31 Thread Jesse Rosenthal
"W. Trevor King" writes: > On Fri, Oct 31, 2014 at 01:33:25PM -0400, Jesse Rosenthal wrote: >> We instead initalize the dictionary using the dict comprehension and >> then update it with the values from the tree. This will work with >> both python2 and python3. > > Dict comprehensions are new in

[PATCH v6 4/7] cli: search: Add --output={sender,recipients}

2014-10-31 Thread Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. To print both, the user can use --output=sender and --output=recipients simultaneously. Currently, the same address can appear multiple times in the output. The next commit will change this. For this reason, tests

[PATCH v6 0/7] notmuch search --output=sender/recipients

2014-10-31 Thread Michal Sojka
Hi all, this is v6 of the search --output=address series. It obsoletes v5 (id:1414713573-21461-1-git-send-email-sojkam1 at fel.cvut.cz). Changes from v5 (full diff below): - Added quoting of name parts if that is necessary (pointed out by Mark Walters). Structured formats contain both full

[PATCH v6 1/7] cli: search: Refactor passing of command line options

2014-10-31 Thread Michal Sojka
Many functions that implement the search command need to access command line options. Instead of passing each option in a separate variable, put them in a structure and pass only this structure. This will become handy in the following commits. --- notmuch-search.c | 125

[PATCH v6 3/7] cli: search: Convert --output to keyword-flag argument

2014-10-31 Thread Michal Sojka
This converts "notmuch search" to use the recently introduced keyword-flag argument parser. At this point, it only makes the code slightly less readable but following commits that add new --output keywords will profit from this. --- notmuch-search.c | 35 ++- 1

[PATCH v6 5/7] cli: search: Do not output duplicate addresses

2014-10-31 Thread Michal Sojka
This filters out duplicate addresses from address outputs (sender, receivers). It also also adds tests for the new outputs. The code here is an extended version of a patch from Jani Nikula. --- doc/man1/notmuch-search.rst | 2 ++ notmuch-search.c| 51 ++

[PATCH v6 7/7] cli: search: Add --filter-by option to configure address filtering

2014-10-31 Thread Michal Sojka
This option allows to configure the criterion for duplicate address filtering. Without this option, all unique combinations of name and address parts are printed. This option allows to filter the output more, for example to only contain unique address parts. --- completion/notmuch-completion.bash

[PATCH v6 6/7] cli: search: Add --output=count

2014-10-31 Thread Michal Sojka
This output can be used with --output=recipients or --output=sender and in addition to the addresses, it prints how many times was each address encountered during search. --- completion/notmuch-completion.bash | 2 +- completion/notmuch-completion.zsh | 2 +- doc/man1/notmuch-search.rst

[PATCH v6 2/7] cli: Add support for parsing keyword-flag arguments

2014-10-31 Thread Michal Sojka
From: Jani Nikula This allows having multiple --foo=bar --foo=baz options on the command line, with the corresponding values OR'd together. [Test added by Michal Sojka] --- command-line-arguments.c | 6 +- command-line-arguments.h | 1 +