Re: python CFFI bindings integration into notmuch build/test

2019-11-17 Thread Floris Bruynooghe
On Sat 16 Nov 2019 at 10:51 -0500, David Bremner wrote: > Floris Bruynooghe writes: >> Anyway, this looks good. Would you like some changes, e.g. the rename >> to notmuch2 or so as patches? What's the next step. > > If you could look at the rename that would be great. Patches on top of >

Tests failing on master

2019-11-17 Thread Johan Parin
In order to be able to run some tests and since OS X Mojave only has bash 3.2, I installed a Kali vm, downloaded a fresh notmuch repo, installed the dependencies and did make test. Result: 1123/1128 tests passed. 3 broken tests failed as expected. 2 tests failed. More details: T050-new:

Re: notmuch ignoring alot of emails

2019-11-17 Thread David Bremner
David Bremner writes: > Eirik Byrkjeflot Anonsen writes: > >> >> Or, notmuch could just look at the first line of the file. If it starts >> with "From ", it is an mbox. If it starts with a reasonable mail header, >> it is not an mbox. If it is neither, fall back to the old heuristics. >> > >

[PATCH 2/2] Rename package to notmuch2

2019-11-17 Thread Floris Bruynooghe
This is based on a previous discussion on the list where this was more or less seen as the least-bad option. --- .../{notdb => notmuch2}/__init__.py| 14 +++--- .../python-cffi/{notdb => notmuch2}/_base.py | 4 ++-- .../python-cffi/{notdb => notmuch2}/_build.py | 4 ++--

[PATCH 1/2] Show which notmuch command and version is being used

2019-11-17 Thread Floris Bruynooghe
This add the notmuch version and absolute path of the binary used in the pytest header. This is nice when running the tests interactively as you get confirmation you're testing the version you thought you were testing. --- bindings/python-cffi/tests/conftest.py | 7 +++ 1 file changed, 7

Rename and small tweaks to wip/cffi

2019-11-17 Thread Floris Bruynooghe
Hi, This is a patch against the wip/cffi branch. It does the rename which was discussed before and it adds a small improvment (to me) to the test runner to show which notmuch version is being tested. Let me know if this the right or wrong way to contribute to this branch. Cheers, Floris

Re: Tests failing on master

2019-11-17 Thread Johan Parin
Johan Parin writes: > In order to be able to run some tests and since OS X Mojave only has > bash 3.2, I installed a Kali vm, downloaded a fresh notmuch repo, > installed the dependencies and did make test. Result: > > 1123/1128 tests passed. > 3 broken tests failed as expected. > 2 tests

Re: can a notmuch query filter the output based on the size of a thread?

2019-11-17 Thread David Bremner
Daniel Kahn Gillmor writes: > Just to flesh it out a bit further, do you think that such a thread > object would have anything attached to it other than message-count? or > maybe a list of message-ids? dates? aggregated senders? aggregated > recipients? I think it would have the union of

Re: Tests failing on master

2019-11-17 Thread David Bremner
Johan Parin writes: > Johan Parin writes: > >> In order to be able to run some tests and since OS X Mojave only has >> bash 3.2, I installed a Kali vm, downloaded a fresh notmuch repo, >> installed the dependencies and did make test. Result: >> >> 1123/1128 tests passed. >> 3 broken tests

Re: notmuch ignoring alot of emails

2019-11-17 Thread David Bremner
Eirik Byrkjeflot Anonsen writes: > > Or, notmuch could just look at the first line of the file. If it starts > with "From ", it is an mbox. If it starts with a reasonable mail header, > it is not an mbox. If it is neither, fall back to the old heuristics. > FTR, this is what happens now

Re: python CFFI bindings integration into notmuch build/test

2019-11-17 Thread David Bremner
Floris Bruynooghe writes: > > I still have a bunch of non-existing messages with weird unicode message > IDs in them, but no associated filename just an empty string. AFAIK > notmuch_database_remove_message() needs a filename though, I've tried > removing the empty file which does not fail but

Re: can a notmuch query filter the output based on the size of a thread?

2019-11-17 Thread Daniel Kahn Gillmor
On Sat 2019-11-16 10:38:44 -0500, David Bremner wrote: > Alternatively someone (TM) could add thread objects to the notmuch > database. This would allow much faster thread operations, but would > require some fairly delicate maintenance of the thread > objects. Basically they would need to updated

Re: unifying and automating draft ("postpone/resume") behavior [was: Re: notmuch "lost" email during power failure]

2019-11-17 Thread Daniel Kahn Gillmor
On Fri 2019-11-15 10:08:02 -0500, Antoine Beaupré wrote: > The individual calls are not what's prohibitively expensive. The problem > is latency. Even if it just takes 100ms[1] to save the file to the disk, > that's a huge delay in terms of human interface, because the entire > Emacs UI will

Re: Python3 cffi bindings

2019-11-17 Thread Floris Bruynooghe
Hi Gaute, Thanks for trying this out! On Mon 04 Nov 2019 at 11:27 +0100, Gaute Hope wrote: > I just checked out the wip/cffi branch on git.notmuch.org with the > purpose of porting Lieer (https://github.com/gauteh/lieer). There > seems to be some missing functionality: `Database.get_directory()`

Re: Python3 cffi bindings

2019-11-17 Thread Gaute Hope
On Sun, Nov 17, 2019 at 6:14 PM Floris Bruynooghe wrote: > > Hi Gaute, > > Thanks for trying this out! > > On Mon 04 Nov 2019 at 11:27 +0100, Gaute Hope wrote: > > I just checked out the wip/cffi branch on git.notmuch.org with the > > purpose of porting Lieer (https://github.com/gauteh/lieer).

[PATCH 3/7] emacs/tree: add notmuch-tree-matching-message

2019-11-17 Thread William Casarin
This functions removes some duplicate logic between notmuch-tree-{next,prev}-matching-message We do this because we will be adding some additional logic similar to the notmuch-show-next-open-message function, and it will help if this logic is all in one place. Signed-off-by: William Casarin ---

[PATCH 5/7] emacs/tree: add notmuch-tree-archive-message-than-next-or-exit

2019-11-17 Thread William Casarin
This is the notmuch-tree version of notmuch-show-archive-message-than-next-or-exit. Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index

[PATCH 0/7] Port notmuch-show's x/X bindings to notmuch-tree

2019-11-17 Thread William Casarin
These patches bring notmuch-tree more in line with the user experience of notmuch-show by adding the x/X bindings. id:20191113225752.26502-1-j...@jb55.com is also recommended, it adds a bind for opening a thread in notmuch-tree mode. William Casarin (7): emacs/tree: return true if a thread was

[PATCH 7/7] emacs/tree: add x/X bindings

2019-11-17 Thread William Casarin
Add x and X binds to notmuch-tree for functionally that we have in notmuch-show. The notmuch-tree-quit binding is somewhat redundant, since it is handled by notmuch-bury-or-kill-this-buffer which is bound to q. Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 3 ++- 1 file changed, 2

[PATCH 2/7] emacs/tree: add notmuch-tree-goto-matching-message

2019-11-17 Thread William Casarin
This function captures some common logic when jumping to matching messages in notmuch-tree mode. We also add a new return value (t or nil), that indicates if there was a next matching message in the thread to show. Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 17 +

[PATCH 1/7] emacs/tree: return true if a thread was found in next-thread

2019-11-17 Thread William Casarin
This will allow us to pop back to parent buffers when there are no more threads to jump to. Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index c00315e8..4bc05160

[PATCH 4/7] emacs/tree: add kill-both prefix argument to notmuch-tree-quit

2019-11-17 Thread William Casarin
This allows us to close both windows at the same time. Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index b9173790..367b10c4 100644 --- a/emacs/notmuch-tree.el +++

[PATCH 6/7] emacs/tree: add notmuch-tree-archive-thread-then-exit

2019-11-17 Thread William Casarin
This is the notmuch-tree version of notmuch-show-archive-thread-then-exit Signed-off-by: William Casarin --- emacs/notmuch-tree.el | 6 ++ 1 file changed, 6 insertions(+) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index fd6f9f83..b8844b64 100644 --- a/emacs/notmuch-tree.el

[PATCH] configure: fix reference to possibly undefined $PKG_CONFIG_PATH

2019-11-17 Thread Tomi Ollila
In case zlib not found by pkg-config(1) the pkg-config information is resolved by attempting to print ZLIB_VERSION from from zlib installation if it exists anyway. If above done successfully compat/zlib.pc is written for forthcoming pkg-config execution. Since `set -u` is in effect (since

[PATCH] Move from _add_message to _index_file API

2019-11-17 Thread Floris Bruynooghe
This moves away from the deprecated notmuch_database_add_message API and instead uses the notmuch_database_index_file API. This means instroducing a class to manage the index options and bumping the library version requirement to 5.1. --- bindings/python-cffi/notdb/_build.py| 26 +-

Adressing deprecation warnings

2019-11-17 Thread Floris Bruynooghe
This addresses the deprecation warning pointed out in another thread on this list. It's also a nice self-contained example of adding an API including a new object. This patch is against the wip/cffi branch, it does not rely on my other patch against this branch which renames things. Conflicts

[PATCH] test: add a known broken test for S/MIME decryption

2019-11-17 Thread David Bremner
This should serve to clarify this feature is not implimented in notmuch yet. --- test/T355-smime.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T355-smime.sh b/test/T355-smime.sh index 336da917..11a4d6cd 100755 --- a/test/T355-smime.sh +++ b/test/T355-smime.sh @@ -94,4

Re: [PATCH 5/7] emacs/tree: add notmuch-tree-archive-message-than-next-or-exit

2019-11-17 Thread William Casarin
William Casarin writes: > This is the notmuch-tree version of > notmuch-show-archive-message-than-next-or-exit. > > Signed-off-by: William Casarin > --- > emacs/notmuch-tree.el | 30 -- > 1 file changed, 20 insertions(+), 10 deletions(-) > > diff --git