[PATCH] VIM: Add better attachment support

2014-10-02 Thread Ian Main
This patch changes how the notmuch vim client supports attachments: - For each attachment an 'Attachment number: filename' is added to the header - You can then use 'e' to extract the attachment under the cursor or use it elsewhere to extract all attachments (the prior behavior) - You can use

notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread Sergei Shilovsky
I would suggest to use `notmuch config list` to get configuration values in vim if possible Reproduction example follows: /home/sh cat .notmuch-config [new] tags=new;inbox;unread ignore= [search] exclude_tags=deleted;spam [maildir] synchronize_flags=false /home/sh notmuch config list

Re: notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread David Bremner
Sergei Shilovsky sshilov...@gmail.com writes: I would suggest to use `notmuch config list` to get configuration values in vim if possible I guess this is a general question we haven't really resolved, namely sharing configuration information between various notmuch frontends. .notmuch-config

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
From: Austin Clements amdra...@mit.edu In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

Re: [PATCH v3] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Wed, 24 Sep 2014, W. Trevor King wk...@tremily.us wrote: On Wed, Sep 24, 2014 at 05:32:50PM -0400, Austin Clements wrote: + * If the caller is currently in an atomic section (there was a + * notmuch_database_begin_atomic without a matching + * notmuch_database_end_atomic), this will abort

Re: notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread Ian Main
David Bremner wrote: Sergei Shilovsky sshilov...@gmail.com writes: I would suggest to use `notmuch config list` to get configuration values in vim if possible I guess this is a general question we haven't really resolved, namely sharing configuration information between various notmuch

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: This patch simplifies notmuch_database_close to explicitly abort any outstanding transaction and then just call Database::close. This works for both read-only and read/write databases, takes care of committing changes, unifies

[PATCH] VIM: Add URI handling

2014-10-02 Thread Ian Main
This patch adds URI handling to the vim client. You can now press 'u' by default and the client will parse the current line and find any URIs available. If there are more than one it opens the one under the cursor or else it opens the only one available. It also supports mailto: URI's and will

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Thu, 02 Oct 2014, W. Trevor King wk...@tremily.us wrote: On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: This patch simplifies notmuch_database_close to explicitly abort any outstanding transaction and then just call Database::close. This works for both read-only and

Re: [PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
On Thu, Oct 02, 2014 at 04:39:41PM -0400, Austin Clements wrote: On Thu, 02 Oct 2014, W. Trevor King wrote: On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: This patch simplifies notmuch_database_close to explicitly abort any outstanding transaction and then just call

[PATCH] VIM: Use notmuch CLI for config

2014-10-02 Thread Ian Main
This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian --- vim/notmuch.vim | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff

[PATCH v2] VIM: Use notmuch CLI for config

2014-10-02 Thread Ian Main
This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian --- This update changes result to be '' instead of nil by default so missing config items won't cause an error.

[PATCH] VIM: Better reply handling with multiple emails

2014-10-02 Thread Ian Main
This patch fixes reply handling when using multiple emails. This adds a config check for other_email and uses that information when formulating reply headers. It will strip out your own email addresses from the reply and set the From: to be an email of yours found in the original message. Note

[PATCH] Add default configuration values to the man page

2014-10-02 Thread Sergei Shilovsky
--- doc/man1/notmuch-config.rst | 18 ++ 1 file changed, 18 insertions(+) diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst index 3c9a568..9de5534 100644 --- a/doc/man1/notmuch-config.rst +++ b/doc/man1/notmuch-config.rst @@ -49,19 +49,31 @@ The available

[PATCH] VIM: Add better attachment support

2014-10-02 Thread Ian Main
This patch changes how the notmuch vim client supports attachments: - For each attachment an 'Attachment : ' is added to the header - You can then use 'e' to extract the attachment under the cursor or use it elsewhere to extract all attachments (the prior behavior) - You can use 'v' to 'view'

notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread Sergei Shilovsky
I would suggest to use `notmuch config list` to get configuration values in vim if possible Reproduction example follows: /home/sh> cat .notmuch-config [new] tags=new;inbox;unread ignore= [search] exclude_tags=deleted;spam [maildir] synchronize_flags=false /home/sh> notmuch config

notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread David Bremner
Sergei Shilovsky writes: > I would suggest to use `notmuch config list` to get configuration > values in vim if possible I guess this is a general question we haven't really resolved, namely sharing configuration information between various notmuch frontends. .notmuch-config is really the

[PATCH v3] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Wed, 24 Sep 2014, "W. Trevor King" wrote: > On Wed, Sep 24, 2014 at 05:32:50PM -0400, Austin Clements wrote: >> + * If the caller is currently in an atomic section (there was a >> + * notmuch_database_begin_atomic without a matching >> + * notmuch_database_end_atomic), this will abort the

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
From: Austin Clements In Xapian, closing a database implicitly aborts any outstanding transaction and commits changes. For historical reasons, notmuch_database_close had grown to almost, but not quite duplicate this behavior. Before closing the database, it would explicitly

notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread Ian Main
David Bremner wrote: > Sergei Shilovsky writes: > > > I would suggest to use `notmuch config list` to get configuration > > values in vim if possible > > I guess this is a general question we haven't really resolved, namely > sharing configuration information between various notmuch frontends.

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
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/20141002/6a1b6789/attachment.pgp>

[PATCH] VIM: Add URI handling

2014-10-02 Thread Ian Main
This patch adds URI handling to the vim client. You can now press 'u' by default and the client will parse the current line and find any URIs available. If there are more than one it opens the one under the cursor or else it opens the only one available. It also supports mailto: URI's and will

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread Austin Clements
On Thu, 02 Oct 2014, "W. Trevor King" wrote: > On Thu, Oct 02, 2014 at 03:19:08PM -0400, Austin Clements wrote: >> This patch simplifies notmuch_database_close to explicitly abort any >> outstanding transaction and then just call Database::close. This >> works for both read-only and read/write

[PATCH v4] lib: Simplify close and codify aborting atomic section

2014-10-02 Thread W. Trevor King
ted 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/20141002/e2fe9c19/attachment.pgp>

[PATCH] VIM: Use notmuch CLI for config

2014-10-02 Thread Ian Main
This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian --- vim/notmuch.vim | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff

[PATCH v2] VIM: Use notmuch CLI for config

2014-10-02 Thread Ian Main
This patch switches from reading .notmuch-config directly to using the CLI the same way that emacs does it. It actually uses less code and is probably less error prone. Ian --- This update changes result to be '' instead of nil by default so missing config items won't cause an error.

[PATCH] VIM: Better reply handling with multiple emails

2014-10-02 Thread Ian Main
This patch fixes reply handling when using multiple emails. This adds a config check for other_email and uses that information when formulating reply headers. It will strip out your own email addresses from the reply and set the From: to be an email of yours found in the original message. Note

notmuch-vim doesn't respect notmuch config defaults

2014-10-02 Thread Ian Main
Sergei Shilovsky wrote: > I would suggest to use `notmuch config list` to get configuration > values in vim if possible > > Reproduction example follows: > > /home/sh> cat .notmuch-config > [new] > tags=new;inbox;unread > ignore= > > [search] > exclude_tags=deleted;spam > > [maildir] >