[PATCH v1 1/1] test: Perform T170 tests that don't require dtach before any that do.

2017-08-27 Thread David Edmondson
This avoids the later tests seeing different versions of the database depending on whether dtach is available. --- test/T170-sexp.sh | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh index 40e5e21d..db142e49 100755 ---

Re: [PATCH v2] emacs: Add notmuch-update-search-tags

2017-08-27 Thread Mark Walters
Hi OK I have now actually tested it, and I have read the patch more carefully, but I am afraid I still have concerns. The key problem is the patch assumes that the display of a thread in a search buffer depends only on the thread. And this is not true as the number of matching messages is

Re: [PATCH 1/5] build: add target to run cppcheck

2017-08-27 Thread Jani Nikula
On Sat, 26 Aug 2017, David Bremner wrote: > The advantage of having a target as opposed to running cppcheck by > hand > > - reuse list of source files > - output errors in a format parsable, e.g. by emacs > - returns exit code 1 on any error, for possibly use in other >

Duplicate message ids

2017-08-27 Thread Mark Walters
Hi A concern for notmuch is some form of attack via someone sending a message with a duplicate message id. I think I have seen it asserted that it is not so much of a problem as the first message received by notmuch will have priority. However, I believe that this is not the case. The script

[PATCH 4/5] lib: enforce that n_message_reindex takes headers from first file

2017-08-27 Thread David Bremner
This is still a bit stopgap to be only choosing one set of headers, but this seems like a more defensible set of headers to choose. --- lib/message.cc | 4 +++- test/T670-duplicate-mid.sh | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/message.cc

[PATCH 2/5] test/duplicate-mid: clarify index order vs filename order

2017-08-27 Thread David Bremner
The existing test for notmuch search had the first in filename order the same as the first indexed, which made it harder to understand what the underlying behaviour is. Add a file with a lexicographically smaller name, but later index time to clarify this. --- test/T670-duplicate-mid.sh | 10

[PATCH 1/5] test: make fallback to duplicate test more robust.

2017-08-27 Thread David Bremner
The original intent of this test was to verify that notmuch show was not crashing when the first file (where headers are being read from) was deleted. Run the output through some sanitization so that as we add and delete copies we don't have to update this test. --- test/T670-duplicate-mid.sh |

[PATCH 3/5] test: known broken test for subject after reindexing

2017-08-27 Thread David Bremner
In [1], Mark gave a test that was behaving strangly. This turns out to be specific to reindexing. I suppose one could argue that picking the lexicographically last file name is a defensible choice, but it's almost as easy to take the first, which seems more intuitive. So mark the current

[PATCH 5/5] test/duplicate-mid: check for subject with notmuch-show

2017-08-27 Thread David Bremner
In [1] Mark showed that the the current code (d7a49e81) is not consistent in it's handling of subjects of messages with duplicate message-ids (or in notmuch-speak, of messages with multiple files). notmuch-search uses indexing order and explicitedly preserves the first. notmuch-show (apparently)

[PATCH] test: duplicate mids: add an extra broken search test

2017-08-27 Thread Mark Walters
--- Hi Many thanks to bremner for the parent patch. I thought it might be worth adding a search test after the broken show test demonstrating the distinction between show and search. When I added it I found it actually gives the other file as the answer! This applies on top of the parent patch.

[PATCH] test: check for subject consistency between search and show

2017-08-27 Thread David Bremner
In [1] Mark showed that the the current code (d7a49e81) is not consistent in it's handling of subjects of messages with duplicate message-ids (or in notmuch-speak, of messages with multiple files). notmuch-search uses indexing order and explicitedly preserves the first. notmuch-show (apparently)

[PATCH v1 0/4] Improved citation washing.

2017-08-27 Thread David Edmondson
Improved citation washing. - More aggressive citation washing. - Allow washing during text/plain reply generation. -- I acknowledge that some of the citation washing can seem aggressive at times, but it does make my life more pleasant (no more shouting at the screen "what was he thinking!"

[PATCH v1 3/4] emacs: test: Update expected output

2017-08-27 Thread David Edmondson
Update the expected output of the tests to conform with the new citation tidying. --- .../notmuch-show-elide-non-matching-messages-off | 2 ++ .../notmuch-show-elide-non-matching-messages-on| 2 ++ .../notmuch-show-indent-thread-content-off

[PATCH v1 2/4] emacs: wash: Improved citation tidying

2017-08-27 Thread David Edmondson
Improve the citation tidying by being more aggressive about the changes made: - collapse all citation leaders to the canonical form (stripping out intervening spaces, for example), - ensure that a blank line exists before and after every block of cited text. --- emacs/notmuch-wash.el | 42

[PATCH v1 4/4] emacs: reply: Allow washing of inserted text parts during reply

2017-08-27 Thread David Edmondson
When inserting a text/plain part during reply generation, add a hook that allows the user to improve the display of the part. As an example, the function `notmuch-wash-tidy-citations' might be called. --- emacs/notmuch-mua.el | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH v1 1/4] emacs: wash: Wrap long lines after tidying citations

2017-08-27 Thread David Edmondson
Citation tidying might change the length of some lines, making it more appropriate to perform line wrapping after citation tidying rather than before. --- emacs/notmuch-show.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el

Re: all intermediate drafts appear in threads (v0.24.2, Emacs 25.2)

2017-08-27 Thread Sanjoy Mahajan
On 2017-07-18 07:42, David Bremner wrote: > Two things you might find useful to know: > > - you can resume editing a previous draft with 'e' > - autosaving does not create drafts > > If it really bugs you, you could override the binding C-x C-s in > notmuch-show mode.