[PATCH 1/3] test: Adding non-maildir tags does not move message from new to cur

2013-09-03 Thread David Bremner
Michal Sojka writes: > From: Michal Sojka > > Some MUA's like mutt show the difference between "new" emails living in > maildir > directory new/, and "old" emails living in maildir directory cur/. However > notmuch tag unconditionally moves selected messages from new/ to cur/, even if > no

[PATCH 0/2] emacs: simplify and cleanup notmuch-mua-reply

2013-09-03 Thread Tomi Ollila
On Wed, Aug 28 2013, Jani Nikula wrote: > This is an alternative to [1]. I tried to dig through history, and I > couldn't find a decent reason for having the backwards regexp in place. I played a bit with this and this works fine. Looks good & tests pass. +1 > > BR, > Jani. Tomi > > > [1]

[PATCH 0/4] contrib: pick: extra tests

2013-09-03 Thread Tomi Ollila
On Tue, Sep 03 2013, Mark Walters wrote: > This series adds some tests for various existing and recently added > functionality. > > The only thing to note is that the xapian tag database and the > displayed tags are update separately so we need to test both. Looks good (afaiu), tests pass >

[PATCH v2 9/9] emacs: Move ?, q, s, m, =, and G to the common keymap

2013-09-03 Thread Austin Clements
The only user-visible effect of this should be that "G" now works in show mode (previously it was unbound for no apparent reason). This shared keymap gives us one place to put global commands, which both forces us to think about what commands should be global, and ensures their bindings can't

[PATCH v2 8/9] emacs: Define a common shared keymap for all of notmuch

2013-09-03 Thread Austin Clements
This defines a single, currently empty keymap that all other notmuch mode maps inherit from. --- emacs/notmuch-hello.el | 10 -- emacs/notmuch-lib.el |5 + emacs/notmuch-show.el |1 + emacs/notmuch.el |1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff

[PATCH v2 7/9] emacs: Make notmuch-help work with arbitrary keymaps

2013-09-03 Thread Austin Clements
This converts notmuch-help to use map-keymap for all keymap traversal. This generally cleans up and simplifies construction of keymap documentation, and also makes notmuch-help support anything that can be in a keymap, including more esoteric stuff like multiple inheritance. --- emacs/notmuch.el

[PATCH v2 6/9] emacs: Add unified refresh-this-buffer function

2013-09-03 Thread Austin Clements
This unifies the various refresh and poll-and-refresh functions we have for different modes. Now all modes bind "=" and "G" (except show, which doesn't bind "G" for some reason) to `notmuch-refresh-this-buffer' and `notmuch-poll-and-refresh-this-buffer', respectively. --- emacs/notmuch-hello.el

[PATCH v2 5/9] emacs: Move `notmuch-poll' to notmuch-lib

2013-09-03 Thread Austin Clements
--- emacs/notmuch-lib.el | 38 ++ emacs/notmuch.el | 38 -- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 4796f17..9754e16 100644 ---

[PATCH v2 4/9] emacs: Remove notmuch-search quit continuation

2013-09-03 Thread Austin Clements
Since notmuch-hello doesn't need this any more, we can remove this hack. This also eliminates `notmuch-search-quit', so now all modes bind "q" to `notmuch-kill-this-buffer'. --- emacs/notmuch.el | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git

[PATCH v2 3/9] emacs: Bind "s" to notmuch-search in hello-mode

2013-09-03 Thread Austin Clements
Since there is now no difference between notmuch-hello-search and notmuch-search when called interactively, bind "s" to notmuch-search in notmuch-hello-mode-map. Now all modes bind "s" this way. --- emacs/notmuch-hello.el |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v2 2/9] emacs: Refresh hello whenever the user switches to the buffer

2013-09-03 Thread Austin Clements
Previously, we refreshed hello when the user quit a search that was started from hello. This is fine assuming purely stack-oriented buffer use, but is quite fragile and requires hacks to search. This replaces that logic with a new approach that refreshes hello whenever the user switches to the

[PATCH v2 1/9] emacs: Consistently use configured sort order

2013-09-03 Thread Austin Clements
Previously, if `notmuch-search' was called interactively (bound to "s" in search and show, but not hello), it would always use newest-first. However, `notmuch-hello-search' (bound to "s" in hello) and `notmuch-hello-widget-search` would call it with the user-configured sort order. This

[PATCH v2 0/9] emacs: Unify common key bindings and lots more

2013-09-03 Thread Austin Clements
This is v2 of id:1377793557-28878-1-git-send-email-amdragon at mit.edu. This fixes a problem found by Jani where notmuch-hello would reset point placement when refreshing in Emacs 24. It also inverts the sense of notmuch-hello-auto-refresh and makes it a defcustom (originally I'd intended

[PATCH 4/4] contrib: pick: test: buffer movement

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 40 ++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick index 6834998..a802d0e 100755 --- a/contrib/notmuch-pick/test/emacs-pick

[PATCH 3/4] contrib: pick: test: stash message id

2013-09-03 Thread Mark Walters
This is important to test as lots of subsequent tests will fail if this fails. --- contrib/notmuch-pick/test/emacs-pick |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick index

[PATCH 2/4] contrib: pick: test: tag/untag whole thread

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 39 ++ .../notmuch-pick-tag-inbox-thread-tagged | 53 2 files changed, 92 insertions(+), 0 deletions(-) create mode 100644

[PATCH 1/4] contrib: pick: test: tag/untag single message

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 34 + .../notmuch-pick-tag-inbox-tagged | 53 2 files changed, 87 insertions(+), 0 deletions(-) create mode 100644

[PATCH 0/4] contrib: pick: extra tests

2013-09-03 Thread Mark Walters
This series adds some tests for various existing and recently added functionality. The only thing to note is that the xapian tag database and the displayed tags are update separately so we need to test both. Best wishes Mark Mark Walters (4): contrib: pick: test: tag/untag single message

[PATCH 1/2] test: add more maildir flag syncing related tests to insert

2013-09-03 Thread Jani Nikula
On Tue, 03 Sep 2013, David Bremner wrote: > Jani Nikula writes: >> >> +test_begin_subtest "Insert message with default tags stays in new/" >> +gen_insert_msg >> +notmuch insert < "$gen_msg_filename" >> +output=$(notmuch search --output=files id:$gen_msg_id) >> +dirname=$(dirname "$output") >>

[PATCH 1/3] database: Add notmuch_database_compact_close

2013-09-03 Thread Ben Gamari
merge compaction functionality without having a mechanism for ensuring data integrity, especially since many users invoke notmuch in a cron job. > I think I'd go for something like: > > notmuch_status_t > notmuch_database_compact (const char *path); > > or > > notmuch_status_t > notmuch_database_compact (const char *path, const char *backup); > > which would internally open the database as read-write to ensure no > modifications, compact, and close. If backup != NULL, it would save the > old database there (same mounted file system as the database is a fine > limitation), otherwise remove. > This sounds fine to me. > Even then I'm not completely sure what Xapian WritableDatabase will do > on close when the database has been switched underneath it. But moving > the database after it has been closed has a race condition too. > Good points. Not sure what the least evil way about this is. Hopefully Xapian's close operation really does just close file handles. Cheers, - Ben [1] http://lists.xapian.org/pipermail/xapian-discuss/2011-July/008310.html -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20130903/522f0d4a/attachment-0001.pgp>

[PATCH] test: update insert tests for new maildir synchronization rules

2013-09-03 Thread Jani Nikula
On Tue, 03 Sep 2013, david at tethera.net wrote: > From: David Bremner > > As of id:1355952747-27350-4-git-send-email-sojkam1 at fel.cvut.cz > we are more conservative about moving messages from ./new to ./cur. > This updates the insert tests to match > --- > > Hopefully this makes sense, and is

[PATCH 2/2] test: improve insert test reliability by checking message-id instead of count

2013-09-03 Thread Jani Nikula
There isn't a reported issue this would fix. Spotted by reading the test. --- test/insert | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/insert b/test/insert index 9b448e5..550b413 100755 --- a/test/insert +++ b/test/insert @@ -68,14 +68,14 @@

[PATCH 1/2] test: add more maildir flag syncing related tests to insert

2013-09-03 Thread Jani Nikula
Specifically test maildir flag syncing with insert. --- These are additional tests on top of David's fix. --- test/insert | 36 1 file changed, 36 insertions(+) diff --git a/test/insert b/test/insert index 1718120..9b448e5 100755 --- a/test/insert +++

[PATCH 1/2] test: add more maildir flag syncing related tests to insert

2013-09-03 Thread David Bremner
Jani Nikula writes: > > +test_begin_subtest "Insert message with default tags stays in new/" > +gen_insert_msg > +notmuch insert < "$gen_msg_filename" > +output=$(notmuch search --output=files id:$gen_msg_id) > +dirname=$(dirname "$output") > +test_expect_equal "$dirname" "$MAIL_DIR/new" I'm

[Patch v3 0/3] contrib: pick: remove an unused variable

2013-09-03 Thread David Bremner
Mark Walters writes: > v2 of this is at id:1377551345-27147-1-git-send-email-markwalters1009 at > gmail.com > > This is unchanged except it is rebased on top of the series > id:1377460534-6022-1-git-send-email-markwalters1009 at gmail.com so that > should be applied first. pushed d

[Patch v4 0/3] Add some thread based actions to pick

2013-09-03 Thread David Bremner
Mark Walters writes: > This is a rebased version of > id:1371195472-441-1-git-send-email-markwalters1009 at gmail.com > > The only other change is a new patch 3 adding previous/next thread > commands: they are both very simple functions based on the first two > patches. > I pushed this. Does

Re: [Patch v4 0/3] Add some thread based actions to pick

2013-09-03 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes: This is a rebased version of id:1371195472-441-1-git-send-email-markwalters1...@gmail.com The only other change is a new patch 3 adding previous/next thread commands: they are both very simple functions based on the first two patches. I

Re: [Patch v3 0/3] contrib: pick: remove an unused variable

2013-09-03 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes: v2 of this is at id:1377551345-27147-1-git-send-email-markwalters1...@gmail.com This is unchanged except it is rebased on top of the series id:1377460534-6022-1-git-send-email-markwalters1...@gmail.com so that should be applied first. pushed

Re: [PATCH 1/2] test: add more maildir flag syncing related tests to insert

2013-09-03 Thread David Bremner
Jani Nikula j...@nikula.org writes: +test_begin_subtest Insert message with default tags stays in new/ +gen_insert_msg +notmuch insert $gen_msg_filename +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname $output) +test_expect_equal $dirname $MAIL_DIR/new I'm not

Re: [PATCH 1/2] test: add more maildir flag syncing related tests to insert

2013-09-03 Thread Jani Nikula
On Tue, 03 Sep 2013, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +test_begin_subtest Insert message with default tags stays in new/ +gen_insert_msg +notmuch insert $gen_msg_filename +output=$(notmuch search --output=files id:$gen_msg_id) +dirname=$(dirname

[PATCH 1/4] contrib: pick: test: tag/untag single message

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 34 + .../notmuch-pick-tag-inbox-tagged | 53 2 files changed, 87 insertions(+), 0 deletions(-) create mode 100644

[PATCH 3/4] contrib: pick: test: stash message id

2013-09-03 Thread Mark Walters
This is important to test as lots of subsequent tests will fail if this fails. --- contrib/notmuch-pick/test/emacs-pick |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick index

[PATCH 0/4] contrib: pick: extra tests

2013-09-03 Thread Mark Walters
This series adds some tests for various existing and recently added functionality. The only thing to note is that the xapian tag database and the displayed tags are update separately so we need to test both. Best wishes Mark Mark Walters (4): contrib: pick: test: tag/untag single message

[PATCH 2/4] contrib: pick: test: tag/untag whole thread

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 39 ++ .../notmuch-pick-tag-inbox-thread-tagged | 53 2 files changed, 92 insertions(+), 0 deletions(-) create mode 100644

[PATCH 4/4] contrib: pick: test: buffer movement

2013-09-03 Thread Mark Walters
--- contrib/notmuch-pick/test/emacs-pick | 40 ++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick index 6834998..a802d0e 100755 --- a/contrib/notmuch-pick/test/emacs-pick

Re: [PATCH 1/3] database: Add notmuch_database_compact_close

2013-09-03 Thread Ben Gamari
Jani Nikula j...@nikula.org writes: On Sat, 24 Aug 2013, Ben Gamari bgamari.f...@gmail.com wrote: This function uses Xapian's Compactor machinery to compact the notmuch database. The compacted database is built in a temporary directory and later moved into place while the original uncompacted

Re: [PATCH 0/4] contrib: pick: extra tests

2013-09-03 Thread Tomi Ollila
On Tue, Sep 03 2013, Mark Walters markwalters1...@gmail.com wrote: This series adds some tests for various existing and recently added functionality. The only thing to note is that the xapian tag database and the displayed tags are update separately so we need to test both. Looks good

Re: [PATCH 0/2] emacs: simplify and cleanup notmuch-mua-reply

2013-09-03 Thread Tomi Ollila
On Wed, Aug 28 2013, Jani Nikula j...@nikula.org wrote: This is an alternative to [1]. I tried to dig through history, and I couldn't find a decent reason for having the backwards regexp in place. I played a bit with this and this works fine. Looks good tests pass. +1 BR, Jani. Tomi

[PATCH v2 4/9] emacs: Remove notmuch-search quit continuation

2013-09-03 Thread Austin Clements
Since notmuch-hello doesn't need this any more, we can remove this hack. This also eliminates `notmuch-search-quit', so now all modes bind q to `notmuch-kill-this-buffer'. --- emacs/notmuch.el | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git

[PATCH v2 2/9] emacs: Refresh hello whenever the user switches to the buffer

2013-09-03 Thread Austin Clements
Previously, we refreshed hello when the user quit a search that was started from hello. This is fine assuming purely stack-oriented buffer use, but is quite fragile and requires hacks to search. This replaces that logic with a new approach that refreshes hello whenever the user switches to the

[PATCH v2 3/9] emacs: Bind s to notmuch-search in hello-mode

2013-09-03 Thread Austin Clements
Since there is now no difference between notmuch-hello-search and notmuch-search when called interactively, bind s to notmuch-search in notmuch-hello-mode-map. Now all modes bind s this way. --- emacs/notmuch-hello.el |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v2 6/9] emacs: Add unified refresh-this-buffer function

2013-09-03 Thread Austin Clements
This unifies the various refresh and poll-and-refresh functions we have for different modes. Now all modes bind = and G (except show, which doesn't bind G for some reason) to `notmuch-refresh-this-buffer' and `notmuch-poll-and-refresh-this-buffer', respectively. --- emacs/notmuch-hello.el | 12

[PATCH v2 5/9] emacs: Move `notmuch-poll' to notmuch-lib

2013-09-03 Thread Austin Clements
--- emacs/notmuch-lib.el | 38 ++ emacs/notmuch.el | 38 -- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 4796f17..9754e16 100644 ---

[PATCH v2 8/9] emacs: Define a common shared keymap for all of notmuch

2013-09-03 Thread Austin Clements
This defines a single, currently empty keymap that all other notmuch mode maps inherit from. --- emacs/notmuch-hello.el | 10 -- emacs/notmuch-lib.el |5 + emacs/notmuch-show.el |1 + emacs/notmuch.el |1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff

[PATCH v2 7/9] emacs: Make notmuch-help work with arbitrary keymaps

2013-09-03 Thread Austin Clements
This converts notmuch-help to use map-keymap for all keymap traversal. This generally cleans up and simplifies construction of keymap documentation, and also makes notmuch-help support anything that can be in a keymap, including more esoteric stuff like multiple inheritance. --- emacs/notmuch.el

[PATCH v2 0/9] emacs: Unify common key bindings and lots more

2013-09-03 Thread Austin Clements
This is v2 of id:1377793557-28878-1-git-send-email-amdra...@mit.edu. This fixes a problem found by Jani where notmuch-hello would reset point placement when refreshing in Emacs 24. It also inverts the sense of notmuch-hello-auto-refresh and makes it a defcustom (originally I'd intended

[PATCH v2 9/9] emacs: Move ?, q, s, m, =, and G to the common keymap

2013-09-03 Thread Austin Clements
The only user-visible effect of this should be that G now works in show mode (previously it was unbound for no apparent reason). This shared keymap gives us one place to put global commands, which both forces us to think about what commands should be global, and ensures their bindings can't

[PATCH v2 1/9] emacs: Consistently use configured sort order

2013-09-03 Thread Austin Clements
Previously, if `notmuch-search' was called interactively (bound to s in search and show, but not hello), it would always use newest-first. However, `notmuch-hello-search' (bound to s in hello) and `notmuch-hello-widget-search` would call it with the user-configured sort order. This inconsistency

Re: [PATCH 1/3] test: Adding non-maildir tags does not move message from new to cur

2013-09-03 Thread David Bremner
Michal Sojka sojk...@fel.cvut.cz writes: From: Michal Sojka so...@os.inf.tu-dresden.de Some MUA's like mutt show the difference between new emails living in maildir directory new/, and old emails living in maildir directory cur/. However notmuch tag unconditionally moves selected messages