Snoozing messages

2014-11-06 Thread Daniel Schoepe
Hi Trevor,

yeah I saw that your client implemented that, but didn't want to switch
away from the standard emacs interface. Moreover, by using a daemon like
at the functionality can basically be used with any notmuch interface.

Best regards,
Daniel

On Thu, 06 Nov 2014 20:09 +0100, Trevor Jim wrote:
> BTW my nevermore client for notmuch implements snoozing in elisp. It's barely 
> functional but nice in that it does not rely on a separate daemon like at.
> https://github.com/tjim/nevermore
>
> -Trevor
> ?


[PATCH] cli: notmuch address option defaults update

2014-11-06 Thread Tomi Ollila
When no --output option were given, change default to display senders
only. This is faster and provides useful-enough list of addresses.

When only --count option is given, display senders (in contrary to not
displaying anything).

Document how --count affects to "sort order" a bit more accurately.

Clean up some whitespace in the documentation.

One test updated to have --output=count without sender nor recipient
output option.
---

Some quick updates to the notmuch address interface which I hope will
be considered to be included in 0.19 release. As we are in feature freeze
I hope this gets quick feedback, in any way you desire.

Tomi

 doc/man1/notmuch-address.rst | 34 ++
 notmuch-search.c |  4 ++--
 test/T095-address.sh | 14 +++---
 3 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst
index 359616e0dc5f..034607c434d2 100644
--- a/doc/man1/notmuch-address.rst
+++ b/doc/man1/notmuch-address.rst
@@ -32,28 +32,28 @@ Supported options for **address** include
 ``--output=(sender|recipients|count)``

 Controls which information appears in the output. This option
-   can be given multiple times to combine different outputs.
-   Omitting this option is equivalent to
-   --output=sender --output=recipients.
+can be given multiple times to combine different outputs.
+Omitting this option is equivalent to --output=sender.

-   **sender**
+**sender**
 Output all addresses from the *From* header.

-   Note: Searching for **sender** should be much faster than
-   searching for **recipients**, because sender addresses are
-   cached directly in the database whereas other addresses
-   need to be fetched from message files.
+Note: Searching for **sender** should be much faster than
+searching for **recipients**, because sender addresses are
+cached directly in the database whereas other addresses
+need to be fetched from message files.

-   **recipients**
+**recipients**
 Output all addresses from the *To*, *Cc* and *Bcc*
 headers.

-   **count**
-   Print the count of how many times was the address
-   encountered during search.
+**count**
+Print the count of how many times was the address
+encountered during search.

-   Note: With this option, addresses are printed only after
-   the whole search is finished. This may take long time.
+Note: With this option, addresses are printed only after
+the whole search is finished (and in seemingly random
+order). This may take long time.

 ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
 This option can be used to present results in either
@@ -63,7 +63,9 @@ Supported options for **address** include
 By default, results will be displayed in reverse chronological
 order, (that is, the newest results will be displayed first).

-   This option has no effect when used with --output=count.
+This option affects the seemingly random output order when
+used with --output=count.
+

 ``--exclude=(true|false)``
 A message is called "excluded" if it matches at least one tag in
@@ -95,4 +97,4 @@ SEE ALSO
 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
 **notmuch-new(1)**, **notmuch-reply(1)**, **notmuch-restore(1)**,
 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**,
-***notmuch-search(1)**
+**notmuch-search(1)**
diff --git a/notmuch-search.c b/notmuch-search.c
index 5036d8e44005..14b9f01c5ad1 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -735,8 +735,8 @@ notmuch_address_command (notmuch_config_t *config, int 
argc, char *argv[])
 if (opt_index < 0)
return EXIT_FAILURE;

-if (! ctx->output)
-   ctx->output = OUTPUT_SENDER | OUTPUT_RECIPIENTS;
+if (! (ctx->output & (OUTPUT_SENDER | OUTPUT_RECIPIENTS)))
+   ctx->output |= OUTPUT_SENDER;

 if (_notmuch_search_prepare (ctx, config,
 argc - opt_index, argv + opt_index))
diff --git a/test/T095-address.sh b/test/T095-address.sh
index 033d0f4fd68c..ed0cac7807ff 100755
--- a/test/T095-address.sh
+++ b/test/T095-address.sh
@@ -27,6 +27,11 @@ Mikhail Gusarov 
 EOF
 test_expect_equal_file OUTPUT EXPECTED

+test_begin_subtest "without --output"
+notmuch address '*' >OUTPUT
+# Use EXPECTED from previous subtest
+test_expect_equal_file OUTPUT EXPECTED
+
 test_begin_subtest "--output=sender --format=json"
 notmuch address --output=sender --format=json '*' >OUTPUT
 cat OUTPUT
-# Use EXPECTED from previous subtest

Snoozing messages

2014-11-06 Thread Daniel Schoepe
Hi,

inspired by my alarm clock and the snooze feature found in some other
mail clients, I cobbled something together that allows snoozing
(i.e. removing a message from the inbox and adding it again later)
messages in notmuch. It's a small script that removes the inbox tag from
messages and schedules a job to add it again later using the at daemon
[1].

Time is specified in the format accepted by the perl library Date::Manip
[2]. It supports both absolute dates as well as relative times such as
"+5min".

The code is available here: https://github.com/dschoepe/notmuch-snooze

Best regards,
Daniel

[1] https://packages.qa.debian.org/a/at.html
[2] http://search.cpan.org/~sbeck/Date-Manip/lib/Date/Manip.pod
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20141106/f04992ab/attachment-0001.pgp>


[PATCH] doc: whitespace cleanup

2014-11-06 Thread Tomi Ollila
Changed one tab in doc/man1/notmuch-show.rst to 8 spaces.

Removed one leading tab in doc/man5/notmuch-hooks.rst to make
the SYNOPSIS style consistent with other pages.
---
 doc/man1/notmuch-show.rst  | 2 +-
 doc/man5/notmuch-hooks.rst | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/man1/notmuch-show.rst b/doc/man1/notmuch-show.rst
index 5aecbfd7d041..9eb5198daf90 100644
--- a/doc/man1/notmuch-show.rst
+++ b/doc/man1/notmuch-show.rst
@@ -73,7 +73,7 @@ Supported options for **show** include
 '>' character added. This reversible escaping is termed
 "mboxrd" format and described in detail here:

-   
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
+
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html

 **raw** (default if --part is given)
 Write the raw bytes of the given MIME part of a message to
diff --git a/doc/man5/notmuch-hooks.rst b/doc/man5/notmuch-hooks.rst
index f1c2528c5666..f96a923b23f2 100644
--- a/doc/man5/notmuch-hooks.rst
+++ b/doc/man5/notmuch-hooks.rst
@@ -5,7 +5,7 @@ notmuch-hooks
 SYNOPSIS
 

-   $DATABASEDIR/.notmuch/hooks/*
+$DATABASEDIR/.notmuch/hooks/*

 DESCRIPTION
 ===
-- 
2.0.0



Snoozing messages

2014-11-06 Thread Trevor Jim
BTW my nevermore client for notmuch implements snoozing in elisp. It's barely 
functional but nice in that it does not rely on a separate daemon like at.
https://github.com/tjim/nevermore

-Trevor
?
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20141106/9b813b68/attachment.html>


[WIP PATCH 3/4] lib: API to retrieve database revision and UUID

2014-11-06 Thread Gaute Hope
Hi,

there's a typo in ..get_revision (revisison).

Cheers, Gaute

Excerpts from Austin Clements's message of October 13, 2014 8:20:
> +unsigned long
> +notmuch_database_get_revisison (notmuch_database_t *notmuch,


feature freeze for notmuch 0.19

2014-11-06 Thread David Bremner
David Bremner  writes:

> Hi Gang;
>
> As always we have plenty of things on the go, but I think theres enough
> merged in since 0.18.2 (yesterday!) to make a release worthwhile. To
> pick a date completely at random *cough* I'd like to freeze on November
> 5. For those of you just joining us that means I'll merge master to
> release at that point, and then only take "important" bug fix and NEWS
> patches onto release for the next week or so, followed by a release.

As promised, I tagged (and uploaded to debian experimental) 0.19~rc1.

One slightly intrusive change during the release wrangling is that I
made the LIBNOTMUCH_MAJOR_VERSION in lib/notmuch.h match the
SOVERSION. Somewhat surprising this didn't break anything before.

d


[PATCH v3 09/10] cli: address: Add --output=count

2014-11-06 Thread David Bremner
Michal Sojka  writes:

> This output prints how many times was each address encountered during
> search.

I pushed the first 9 patches, plus a fixup commit to actually build the
man pages.  Since this actually adds the summary line to the man page,
please double check and suggest improvements if needed.

d


Re: [WIP PATCH 3/4] lib: API to retrieve database revision and UUID

2014-11-06 Thread Gaute Hope

Hi,

there's a typo in ..get_revision (revisison).

Cheers, Gaute

Excerpts from Austin Clements's message of October 13, 2014 8:20:

+unsigned long
+notmuch_database_get_revisison (notmuch_database_t *notmuch,

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] doc: whitespace cleanup

2014-11-06 Thread Tomi Ollila
Changed one tab in doc/man1/notmuch-show.rst to 8 spaces.

Removed one leading tab in doc/man5/notmuch-hooks.rst to make
the SYNOPSIS style consistent with other pages.
---
 doc/man1/notmuch-show.rst  | 2 +-
 doc/man5/notmuch-hooks.rst | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/man1/notmuch-show.rst b/doc/man1/notmuch-show.rst
index 5aecbfd7d041..9eb5198daf90 100644
--- a/doc/man1/notmuch-show.rst
+++ b/doc/man1/notmuch-show.rst
@@ -73,7 +73,7 @@ Supported options for **show** include
 '' character added. This reversible escaping is termed
 mboxrd format and described in detail here:
 
-   
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
+
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
 
 **raw** (default if --part is given)
 Write the raw bytes of the given MIME part of a message to
diff --git a/doc/man5/notmuch-hooks.rst b/doc/man5/notmuch-hooks.rst
index f1c2528c5666..f96a923b23f2 100644
--- a/doc/man5/notmuch-hooks.rst
+++ b/doc/man5/notmuch-hooks.rst
@@ -5,7 +5,7 @@ notmuch-hooks
 SYNOPSIS
 
 
-   $DATABASEDIR/.notmuch/hooks/*
+$DATABASEDIR/.notmuch/hooks/*
 
 DESCRIPTION
 ===
-- 
2.0.0

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] cli: notmuch address option defaults update

2014-11-06 Thread Tomi Ollila
When no --output option were given, change default to display senders
only. This is faster and provides useful-enough list of addresses.

When only --count option is given, display senders (in contrary to not
displaying anything).

Document how --count affects to sort order a bit more accurately.

Clean up some whitespace in the documentation.

One test updated to have --output=count without sender nor recipient
output option.
---

Some quick updates to the notmuch address interface which I hope will
be considered to be included in 0.19 release. As we are in feature freeze
I hope this gets quick feedback, in any way you desire.

Tomi

 doc/man1/notmuch-address.rst | 34 ++
 notmuch-search.c |  4 ++--
 test/T095-address.sh | 14 +++---
 3 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst
index 359616e0dc5f..034607c434d2 100644
--- a/doc/man1/notmuch-address.rst
+++ b/doc/man1/notmuch-address.rst
@@ -32,28 +32,28 @@ Supported options for **address** include
 ``--output=(sender|recipients|count)``
 
 Controls which information appears in the output. This option
-   can be given multiple times to combine different outputs.
-   Omitting this option is equivalent to
-   --output=sender --output=recipients.
+can be given multiple times to combine different outputs.
+Omitting this option is equivalent to --output=sender.
 
-   **sender**
+**sender**
 Output all addresses from the *From* header.
 
-   Note: Searching for **sender** should be much faster than
-   searching for **recipients**, because sender addresses are
-   cached directly in the database whereas other addresses
-   need to be fetched from message files.
+Note: Searching for **sender** should be much faster than
+searching for **recipients**, because sender addresses are
+cached directly in the database whereas other addresses
+need to be fetched from message files.
 
-   **recipients**
+**recipients**
 Output all addresses from the *To*, *Cc* and *Bcc*
 headers.
 
-   **count**
-   Print the count of how many times was the address
-   encountered during search.
+**count**
+Print the count of how many times was the address
+encountered during search.
 
-   Note: With this option, addresses are printed only after
-   the whole search is finished. This may take long time.
+Note: With this option, addresses are printed only after
+the whole search is finished (and in seemingly random
+order). This may take long time.
 
 ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)
 This option can be used to present results in either
@@ -63,7 +63,9 @@ Supported options for **address** include
 By default, results will be displayed in reverse chronological
 order, (that is, the newest results will be displayed first).
 
-   This option has no effect when used with --output=count.
+This option affects the seemingly random output order when
+used with --output=count.
+
 
 ``--exclude=(true|false)``
 A message is called excluded if it matches at least one tag in
@@ -95,4 +97,4 @@ SEE ALSO
 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
 **notmuch-new(1)**, **notmuch-reply(1)**, **notmuch-restore(1)**,
 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**,
-***notmuch-search(1)**
+**notmuch-search(1)**
diff --git a/notmuch-search.c b/notmuch-search.c
index 5036d8e44005..14b9f01c5ad1 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -735,8 +735,8 @@ notmuch_address_command (notmuch_config_t *config, int 
argc, char *argv[])
 if (opt_index  0)
return EXIT_FAILURE;
 
-if (! ctx-output)
-   ctx-output = OUTPUT_SENDER | OUTPUT_RECIPIENTS;
+if (! (ctx-output  (OUTPUT_SENDER | OUTPUT_RECIPIENTS)))
+   ctx-output |= OUTPUT_SENDER;
 
 if (_notmuch_search_prepare (ctx, config,
 argc - opt_index, argv + opt_index))
diff --git a/test/T095-address.sh b/test/T095-address.sh
index 033d0f4fd68c..ed0cac7807ff 100755
--- a/test/T095-address.sh
+++ b/test/T095-address.sh
@@ -27,6 +27,11 @@ Mikhail Gusarov dotted...@dottedmag.net
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
+test_begin_subtest without --output
+notmuch address '*' OUTPUT
+# Use EXPECTED from previous subtest
+test_expect_equal_file OUTPUT EXPECTED
+
 test_begin_subtest --output=sender --format=json
 notmuch address --output=sender --format=json '*' OUTPUT
 cat EOF EXPECTED
@@ -91,11 +96,6 @@ Mikhail Gusarov dotted...@dottedmag.net
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
-test_begin_subtest without --output
-notmuch address '*' OUTPUT
-# 

Snoozing messages

2014-11-06 Thread Daniel Schoepe
Hi,

inspired by my alarm clock and the snooze feature found in some other
mail clients, I cobbled something together that allows snoozing
(i.e. removing a message from the inbox and adding it again later)
messages in notmuch. It's a small script that removes the inbox tag from
messages and schedules a job to add it again later using the at daemon
[1].

Time is specified in the format accepted by the perl library Date::Manip
[2]. It supports both absolute dates as well as relative times such as
+5min.

The code is available here: https://github.com/dschoepe/notmuch-snooze

Best regards,
Daniel

[1] https://packages.qa.debian.org/a/at.html
[2] http://search.cpan.org/~sbeck/Date-Manip/lib/Date/Manip.pod


signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Snoozing messages

2014-11-06 Thread Trevor Jim

BTW my nevermore client for notmuch implements snoozing in elisp. It's barely 
functional but nice in that it does not rely on a separate daemon like at.
https://github.com/tjim/nevermore

-Trevor

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Snoozing messages

2014-11-06 Thread Daniel Schoepe
Hi Trevor,

yeah I saw that your client implemented that, but didn't want to switch
away from the standard emacs interface. Moreover, by using a daemon like
at the functionality can basically be used with any notmuch interface.

Best regards,
Daniel

On Thu, 06 Nov 2014 20:09 +0100, Trevor Jim wrote:
 BTW my nevermore client for notmuch implements snoozing in elisp. It's barely 
 functional but nice in that it does not rely on a separate daemon like at.
 https://github.com/tjim/nevermore

 -Trevor
 
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch