Re: [PATCH 6/8] cli: crypto: S/MIME verification support

2015-09-26 Thread Jani Nikula
On Sun, 16 Aug 2015, David Bremner <da...@tethera.net> wrote: > From: Jani Nikula <j...@nikula.org> > > notmuch-show --verify will now also process S/MIME multiparts if > encountered. Requires gmime-2.6 and gpgsm. > > Based on work by Jameson Graef Rolli

Re: [bug] notmuch requires Content-Disposition mime header value to be lower case

2015-09-26 Thread Jani Nikula
On Fri, 18 Sep 2015, David Bremner wrote: > Johannes Schauer writes: > >> Hi, >> >> Quoting David Bremner (2015-09-18 14:03:20) >>> I'd recommend making your own new test, rather than modifying existing >>> ones to test multiple things. I'd also recommend

Re: expose notmuch_database_new to libraries?

2015-09-26 Thread Jani Nikula
On Sat, 26 Sep 2015, "Wael M. Nasreddine" wrote: > I have a use case where I'd like to call 'notmuch new' > programmatically via the bindings (custom Go bindings). Is it at all > possible to expose notmuch_new_command[0] through lib/notmuch.h? The > logic of

[PATCH 1/2] lib: content disposition values are not case-sensitive

2015-09-26 Thread Jani Nikula
Per RFC 2183, the values for Content-Disposition values are not case-sensitive. While at it, use the gmime function for getting at the disposition string instead of referencing the field directly. This fixes "attachment" tagging and filename term generation for attachments while indexing. ---

[PATCH] completion: handle notmuch address --deduplicate= option

2015-09-26 Thread Jani Nikula
Complete notmuch address --deduplicate=(no|mailbox|address). --- completion/notmuch-completion.bash | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 960275d1f672..68b069013655 100644 ---

Re: Notmuch removing messages from the index, when calling `new` two times in a row

2015-09-25 Thread Jani Nikula
On Fri, 24 Apr 2015, Mayeu wrote: > On Fri, 24 Apr 2015 07:25:28 +0900 > David Bremner wrote: >> OK. Please try running "notmuch new" (the second time) with --debug. > > The output is exactly the same, no other information. I also tried to > add --verbose

[PATCH 2/3] lib: add interface to delete directory documents

2015-09-25 Thread Jani Nikula
As mentioned in commit acd66cdec075312944e527febd46382e54d99367 Author: Jani Nikula <j...@nikula.org> Date: Sat Sep 5 12:35:31 2015 +0300 cli: reset db directory mtime upon directory removal we don't have an interface to delete directory documents, and they're left behin

[PATCH 0/3] delete directory documents on directory removal

2015-09-25 Thread Jani Nikula
. This series just proves we need to do this. BR, Jani. Jani Nikula (3): test: flag one more notmuch new test as broken lib: add interface to delete directory documents cli: delete directory documents on directory removal lib/directory.cc | 18 ++ lib/notmuch.h| 7

[PATCH 3/3] cli: delete directory documents on directory removal

2015-09-25 Thread Jani Nikula
There was a problem with the directory documents being left behind when the filesystem directory was removed. This was worked around in commit acd66cdec075312944e527febd46382e54d99367 Author: Jani Nikula <j...@nikula.org> Date: Sat Sep 5 12:35:31 2015 +0300 cli: reset db directory

[PATCH 1/3] test: flag one more notmuch new test as broken

2015-09-25 Thread Jani Nikula
Drop the test update added in commit e4e04bbc328f990e36b77f508aef904d156029b1 Author: David Bremner Date: Tue Aug 4 08:48:33 2015 +0200 cli/new: add more debugging output and mark the test as broken, like the tests flagged as broken in commit

[PATCH] cli: use designated initializer to initialize add_files_state

2015-09-25 Thread Jani Nikula
The side effect is that all of add_files_state will be initialized to zero, removing any lingering doubt that some of it might not be initialized. It's not a small struct, and the initialization is scattered around a bit, so this makes the code more readable. --- notmuch-new.c | 13 +

[PATCH 6/9 v3 part 1/2] util: add strcmp_null, a strcmp that handles NULL parameters

2015-09-25 Thread Jani Nikula
Add strcmp_null, a strcmp that handles NULL strings; in strcmp terms a NULL string is considered to be less than a non-NULL string. --- util/string-util.c | 13 + util/string-util.h | 5 + 2 files changed, 18 insertions(+) diff --git a/util/string-util.c b/util/string-util.c

[PATCH 6/9 v3 part 2/2] cli: change the data structure for notmuch address deduplication

2015-09-25 Thread Jani Nikula
Currently we key the address hash table with the case sensitive "name ". Switch to case insensitive keying with just address, and store the case sensitive name and address in linked lists. This will be helpful in adding support for different deduplication schemes in the future. There will be a

[PATCH v2 7½/9] test: add notmuch address --deduplicate=(no|mailbox|address) tests

2015-09-25 Thread Jani Nikula
First a simple smoke test first, next generate messages with multiple email address variants and check the behaviour of deduplication schemes with these. --- v2: more variation in name parts of email addresses --- test/T095-address.sh | 74 1

Re: [PATCH v2 6/9] cli: change the data structure for notmuch address deduplication

2015-09-24 Thread Jani Nikula
On Thu, 24 Sep 2015, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > > >> +else >> +v = !!m1->name - !!m2->name; > > Is this really idiomatic? It seems a little difficult to follow to me. Probably

[PATCH v2] test: check argc in symbol-test

2015-09-23 Thread Jani Nikula
Check argc mainly to fix unused parameter warning: test/symbol-test.cc:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter] int main(int argc, char** argv) { ^ This makes more sense than telling the compiler it's unused on purpose. --- test/symbol-test.cc | 3 +++ 1 file

Re: [PATCH 3½/9] test: notmuch address --deduplicate=no tests

2015-09-23 Thread Jani Nikula
On Sun, 20 Sep 2015, David Bremner <da...@tethera.net> wrote: > Jani Nikula <j...@nikula.org> writes: > >> Test not using address deduplication. Incorporate some trivial output >> sorting tests here, as they seem to lack tests. >&g

[PATCH] man: document notmuch address --deduplicate=(no|mailbox) option

2015-09-23 Thread Jani Nikula
Document the deduplication of results. --- doc/man1/notmuch-address.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index 9570095b23c8..6003ed29cf32 100644 --- a/doc/man1/notmuch-address.rst +++

[PATCH 2/2] cli: reset db directory mtime upon directory removal

2015-09-05 Thread Jani Nikula
The library does not have a function to remove a directory document for a path. Usually this doesn't matter except for a slight waste of space. However, if the same directory gets added to the filesystem again, the old directory document is found with the old mtime. Reset the directory mtime on

[PATCH 1/2] HACK: test: test folder renames

2015-09-05 Thread Jani Nikula
On Sun, 23 Feb 2014, Mark Walters wrote [1]: > I was experimenting with letting notmuch new take an argument to tell it > to scan only a particular directory (and sub-directories) for new > messages. I came across the following strange behaviour which is also > present

[PATCH 7½/9] test: add notmuch address --deduplicate=(no|mailbox|address) tests

2015-09-04 Thread Jani Nikula
First a simple smoke test first, next generate messages with multiple email address variants and check the behaviour of deduplication schemes with these. --- test/T095-address.sh | 63 1 file changed, 63 insertions(+) diff --git

[PATCH 3½/9] test: notmuch address --deduplicate=no tests

2015-09-04 Thread Jani Nikula
Test not using address deduplication. Incorporate some trivial output sorting tests here, as they seem to lack tests. --- test/T095-address.sh | 70 1 file changed, 70 insertions(+) diff --git a/test/T095-address.sh b/test/T095-address.sh

[PATCH 1/2] test: fix whitespace/indentation in symbol-test

2015-09-04 Thread Jani Nikula
Not of much consequence, but makes it nicer to do further edits. --- test/symbol-test.cc | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/test/symbol-test.cc b/test/symbol-test.cc index fb77b418a1a8..77dbc1af44b2 100644 ---

[PATCH 2/2] test: check argc in symbol-test

2015-09-04 Thread Jani Nikula
Check argc mainly to fix unused parameter warning: test/symbol-test.cc:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter] int main(int argc, char** argv) { ^ This makes more sense than telling the compiler it's unused on purpose. --- test/symbol-test.cc | 3 +++ 1 file

[PATCH v2 2/9] cli: abstract new mailbox creation

2015-09-03 Thread Jani Nikula
We'll be needing more mailbox creation soon, so abstract it away. While at it, check for allocation failures. No other functional changes. --- notmuch-search.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index

[PATCH v2 1/9] cli: g_hash_table_lookup_extended is overkill

2015-09-03 Thread Jani Nikula
Switch to normal glib hash table lookup. The extended version is only required if the values may contain NULL. --- notmuch-search.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 3076c3f637b1..7fdc6acaa2fe

[PATCH v2 5/9] util: move strcase_equal and strcase_hash to util

2015-09-03 Thread Jani Nikula
For future use in both cli and lib. --- lib/message-file.c| 21 - lib/notmuch-private.h | 1 + util/string-util.c| 21 + util/string-util.h| 6 ++ 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/lib/message-file.c

[PATCH v2 0/9] cli: alternative address deduplication

2015-09-03 Thread Jani Nikula
to collect all results before printing for --deduplicate=address, similar to --output=count. BR, Jani. Jani Nikula (9): cli: g_hash_table_lookup_extended is overkill cli: abstract new mailbox creation cli: add support for not deduplicating notmuch address results man: document notmuch

[PATCH v2 3/9] cli: add support for not deduplicating notmuch address results

2015-09-03 Thread Jani Nikula
Make it possible to use notmuch address as part of a | sort | uniq -c pipe instead of forcing --output=count. This is useful for combining results from multiple notmuch address queries. --- notmuch-search.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git

[PATCH v2 7/9] cli: add support for deduplicating based on case insensitive address

2015-09-03 Thread Jani Nikula
Consider all variants of an email address as one, and print the most common variant. --- notmuch-search.c | 48 ++-- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 7c51d5df6bd4..deb9e58a747c

[PATCH v2 4/9] man: document notmuch address --deduplicate=(no|mailbox) option

2015-09-03 Thread Jani Nikula
Document the deduplication of results. --- doc/man1/notmuch-address.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index 9570095b23c8..4ae7395bce4d 100644 --- a/doc/man1/notmuch-address.rst +++

[PATCH v2 6/9] cli: change the data structure for notmuch address deduplication

2015-09-03 Thread Jani Nikula
Currently we key the address hash table with the case sensitive "name ". Switch to case insensitive keying with just address, and store the case sensitive name and address in linked lists. This will be helpful in adding support for different deduplication schemes in the future. There will be a

[PATCH v2 9/9] cli: do not sort addresses on --output=count or --deduplicate=address

2015-09-03 Thread Jani Nikula
The order of the results with --output=count and --deduplicate=address are unspecified as they're based on a hash table traversal. This being the case, optimize the query by explicitly requesting unsorted results. Clarify the documentation accordingly. --- doc/man1/notmuch-address.rst | 4 +++-

[PATCH v2 8/9] man: document notmuch address --deduplicate=address option

2015-09-03 Thread Jani Nikula
Document the deduplication based on case insensitive address. --- doc/man1/notmuch-address.rst | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-address.rst b/doc/man1/notmuch-address.rst index 4ae7395bce4d..b85cc37213e5 100644 ---

Re: [RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +static int +strcase_equal (const void *a, const void *b) +{ +return strcasecmp (a, b) == 0; +} + +static unsigned int +strcase_hash (const void *ptr) +{ +const char *s = ptr

Re: [RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: I guess this doesn't make the error handling worse; both old and new code silently ignore OOM if I understand correctly. Oh, and current git will not silently ignore OOM. It will segfault... ;) BR, Jani.

Re: [RFC PATCH 3/5] cli: add support for not deduplicating notmuch address results

2015-08-30 Thread Jani Nikula
On Sun, 30 Aug 2015, David Bremner da...@tethera.net wrote: Jani Nikula j...@nikula.org writes: +{ NOTMUCH_OPT_KEYWORD, ctx-dupe, deduplicate, 'x', probably you want 'D' or 'd' here. Not that it makes a practical difference at this point. + (notmuch_keyword_t []){ { yes, -1

[PATCH 0/5] cli: alternative address deduplication

2015-08-29 Thread Jani Nikula
from:amdragon 1544Austin Clements amdra...@mit.edu 63 Austin Clements amdra...@mit.edu $ notmuch address --output=count from:j...@nikula.org 2344Jani Nikula j...@nikula.org 3 Jani j...@nikula.org 5 j...@nikula.org 6 j...@nikula.org j...@nikula.org And new deduplication

[RFC PATCH 2/5] cli: abstract new mailbox creation

2015-08-29 Thread Jani Nikula
We'll be needing more mailbox creation soon, so abstract it away. While at it, check for allocation failures. No other functional changes. --- notmuch-search.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index

[RFC PATCH 1/5] cli: g_hash_table_lookup_extended is overkill

2015-08-29 Thread Jani Nikula
Switch to normal glib hash table lookup. The extended version is only required if the values may contain NULL. --- notmuch-search.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 3076c3f637b1..7fdc6acaa2fe

[RFC PATCH 3/5] cli: add support for not deduplicating notmuch address results

2015-08-29 Thread Jani Nikula
Make it possible to use notmuch address as part of a | sort | uniq -c pipe instead of forcing --output=count. This is useful for combining results from multiple notmuch address queries. --- notmuch-search.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/notmuch-search.c

[RFC PATCH 4/5] cli: change the data structure for notmuch address deduplication

2015-08-29 Thread Jani Nikula
Currently we key the address hash table with the case sensitive name address. Switch to case insensitive keying with just address, and store the case sensitive name and address in linked lists. This will be helpful in adding support different deduplication schemes in the future. There will be a

Re: [PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default with --client

2015-08-28 Thread Jani Nikula
On Wed, 26 Aug 2015, Tomi Ollila tomi.oll...@iki.fi wrote: On Sat, Aug 15 2015, Jani Nikula j...@nikula.org wrote: Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient

Re: Resending the same email

2015-08-23 Thread Jani Nikula
On Sun, 23 Aug 2015, David Mazieres dm-list-email-notm...@scs.stanford.edu wrote: Sebastian Fischmeister sfisc...@uwaterloo.ca writes: Hi, My previous mail editor had a useful feature to resend already sent emails. It's essentially opening an already sent email and have the senders,

[PATCH] lib: add support for date:..! to mean date:..

2015-08-15 Thread Jani Nikula
It doesn't seem likely we can support simple date: expanding to date:.. any time soon. (This can be done with a future version of Xapian, or with a custom query query parser.) In the mean time, provide shorthand date:..! to mean the same. This is useful, as the expansion takes place before

[PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default with --client

2015-08-15 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- v2: fix killing frame with --create-frame v3: fix --create-frame w/o --client parameter check v4:

[PATCH v4 4/5] notmuch-emacs-mua: add --auto-daemon option to start Emacs daemon as needed

2015-08-15 Thread Jani Nikula
Automatically starting Emacs in daemon mode if the Emacs server is not running is a matter of preference better not hard coded in notmuch-emacs-mua. Add an option to control the behaviour. --- doc/man1/notmuch-emacs-mua.rst | 9 +++-- notmuch-emacs-mua | 8 ++-- 2 files

[PATCH v4 3/5] notmuch-emacs-mua: move --client option handling around

2015-08-15 Thread Jani Nikula
Move --client handling to a more suitable location. No functional changes. --- notmuch-emacs-mua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua index e33aa955d6b5..1f088c42feb9 100755 --- a/notmuch-emacs-mua +++ b/notmuch-emacs-mua

[PATCH v4 2/5] notmuch-emacs-mua: support --no-window-system also for non-client

2015-08-15 Thread Jani Nikula
Clearly --no-window-system should be applicable without --client as well. Prepare for future changes with the naming of the variables. --- notmuch-emacs-mua | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua index

[PATCH v4 1/5] man: clean up notmuch-emacs-mua man page

2015-08-15 Thread Jani Nikula
Move --client description to a more suitable location, stylistic changes. --- doc/man1/notmuch-emacs-mua.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst index 36b51cdc3b18..7c2f5c24f1c0 100644 ---

[PATCH v4 0/5] notmuch-emacs-mua updates

2015-08-15 Thread Jani Nikula
The main goal is to not force --create-frame on users who dislike it. Split to some hopefully less controversial prep patches. BR, Jani. Jani Nikula (5): man: clean up notmuch-emacs-mua man page notmuch-emacs-mua: support --no-window-system also for non-client notmuch-emacs-mua: move

[PATCH v4 4/5] notmuch-emacs-mua: add --auto-daemon option to start Emacs daemon as needed

2015-08-15 Thread Jani Nikula
Automatically starting Emacs in daemon mode if the Emacs server is not running is a matter of preference better not hard coded in notmuch-emacs-mua. Add an option to control the behaviour. --- doc/man1/notmuch-emacs-mua.rst | 9 +++-- notmuch-emacs-mua | 8 ++-- 2 files

[PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default with --client

2015-08-15 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- v2: fix killing frame with --create-frame v3: fix --create-frame w/o --client parameter check v4:

[PATCH v4 3/5] notmuch-emacs-mua: move --client option handling around

2015-08-15 Thread Jani Nikula
Move --client handling to a more suitable location. No functional changes. --- notmuch-emacs-mua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua index e33aa955d6b5..1f088c42feb9 100755 --- a/notmuch-emacs-mua +++ b/notmuch-emacs-mua

[PATCH v4 1/5] man: clean up notmuch-emacs-mua man page

2015-08-15 Thread Jani Nikula
Move --client description to a more suitable location, stylistic changes. --- doc/man1/notmuch-emacs-mua.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst index 36b51cdc3b18..7c2f5c24f1c0 100644 ---

[PATCH v4 2/5] notmuch-emacs-mua: support --no-window-system also for non-client

2015-08-15 Thread Jani Nikula
Clearly --no-window-system should be applicable without --client as well. Prepare for future changes with the naming of the variables. --- notmuch-emacs-mua | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua index

[PATCH v4 0/5] notmuch-emacs-mua updates

2015-08-15 Thread Jani Nikula
The main goal is to not force --create-frame on users who dislike it. Split to some hopefully less controversial prep patches. BR, Jani. Jani Nikula (5): man: clean up notmuch-emacs-mua man page notmuch-emacs-mua: support --no-window-system also for non-client notmuch-emacs-mua: move

[PATCH] lib: add support for date:expr..! to mean date:expr..expr

2015-08-15 Thread Jani Nikula
It doesn't seem likely we can support simple date:expr expanding to date:expr..expr any time soon. (This can be done with a future version of Xapian, or with a custom query query parser.) In the mean time, provide shorthand date:expr..! to mean the same. This is useful, as the expansion takes

[PATCH] configure: clean up messages around reading libnotmuch version

2015-08-10 Thread Jani Nikula
From: Jani Nikula <j...@nikula.org> Clean up punctuation for consistency, and add newline for clean configure output. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d1bcc20eb6c2..d28988036505 100755 --- a/configure

[PATCH] configure: clean up messages around reading libnotmuch version

2015-08-10 Thread Jani Nikula
From: Jani Nikula j...@nikula.org Clean up punctuation for consistency, and add newline for clean configure output. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d1bcc20eb6c2..d28988036505 100755 --- a/configure +++ b/configure

Searching for phrases in the body of an email

2015-07-18 Thread Jani Nikula
On Jul 18, 2015 6:32 PM, "Suvayu Ali" wrote: > > Hi Xu, > > On Sat, Jul 18, 2015 at 10:54:30AM -0400, Xu Wang wrote: > > > > First note that I believe notmuch search is case insensitive by > > default, so your grep should be case insensitive as well. > > Good

Re: Searching for phrases in the body of an email

2015-07-18 Thread Jani Nikula
On Jul 18, 2015 6:32 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: Hi Xu, On Sat, Jul 18, 2015 at 10:54:30AM -0400, Xu Wang wrote: First note that I believe notmuch search is case insensitive by default, so your grep should be case insensitive as well. Good point, I tried that,

Understanding the "replied" tag

2015-06-11 Thread Jani Nikula
On Thu, 11 Jun 2015, Xu Wang wrote: > Dear all, > > First, I am extremely excited to be a part of this list now. notmuch > has really helped me. Thank you go all individuals working to improve > it and to help others to know how to use it. > > I would really like to know if a message has been

Syntactic sugar for range syntax

2015-06-11 Thread Jani Nikula
On Wed, 10 Jun 2015, Robert Künnemann wrote: > I've been using notmuch for about a year now (using mutt-kz) and I am > very happy with it. I have, however, a small suggestion about the range > syntax in search queries. Often, I am looking for emails that have > occurred, say, in the last week.

Re: Syntactic sugar for range syntax

2015-06-11 Thread Jani Nikula
On Wed, 10 Jun 2015, Robert Künnemann rob...@kunnemann.de wrote: I've been using notmuch for about a year now (using mutt-kz) and I am very happy with it. I have, however, a small suggestion about the range syntax in search queries. Often, I am looking for emails that have occurred, say, in

Re: Understanding the replied tag

2015-06-11 Thread Jani Nikula
On Thu, 11 Jun 2015, Xu Wang xuwang...@gmail.com wrote: Dear all, First, I am extremely excited to be a part of this list now. notmuch has really helped me. Thank you go all individuals working to improve it and to help others to know how to use it. I would really like to know if a message

Learning Notmuch

2015-06-06 Thread Jani Nikula
On Sat, 06 Jun 2015, Johnny Utahh wrote: > I'm new to Notmuch. Could I get feedback on the following? > > https://github.com/johnnyutahh/tag-based-email > https://github.com/johnnyutahh/tag-based-email#the_main_questions You're probably better off sending your specific questions to the list, so

Re: Learning Notmuch

2015-06-06 Thread Jani Nikula
On Sat, 06 Jun 2015, Johnny Utahh notmuchmail@johnnyutahh.com wrote: I'm new to Notmuch. Could I get feedback on the following? https://github.com/johnnyutahh/tag-based-email https://github.com/johnnyutahh/tag-based-email#the_main_questions You're probably better off sending your specific

[PATCH] notmuch-emacs-mua: do not create a frame by default with --client

2015-05-09 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- v2: fix killing frame with --create-frame v3: fix --create-frame w/o --client parameter check ---

[PATCH v2] notmuch-emacs-mua: do not create a frame by default with --client

2015-04-04 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- v2: fix killing frame with --create-frame --- doc/man1/notmuch-emacs-mua.rst | 14 +-

[PATCH v2] notmuch-emacs-mua: do not create a frame by default with --client

2015-04-04 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- v2: fix killing frame with --create-frame --- doc/man1/notmuch-emacs-mua.rst | 14 +-

[PATCH] nmbug-status: add support for specifying sort order for each view

2015-04-03 Thread Jani Nikula
Let each view have "sort" key with possible values "oldest-first", "newest-first", and "unsorted", and sort the results accordingly. Oldest first remains the default. --- devel/nmbug/nmbug-status | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH] nmbug-status: add support for specifying sort order for each view

2015-04-03 Thread Jani Nikula
Let each view have sort key with possible values oldest-first, newest-first, and unsorted, and sort the results accordingly. Oldest first remains the default. --- devel/nmbug/nmbug-status | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devel/nmbug/nmbug-status

[PATCH] notmuch-emacs-mua: do not create a frame by default with --client

2015-03-22 Thread Jani Nikula
Make the default behaviour for --client the same as emacsclient default: do not create a new frame. Add a new option --create-frame, passing the same option to emacsclient to create a frame. --- With this, 'notmuch-emacs-mua --client' does what I want, which was not possible with any combination

[PATCH 2/2] cli: add support for notmuch command --help

2015-03-08 Thread Jani Nikula
Recognize 'notmuch command --help' at the top level as a special case, and show help for the command. Note that for simplicity, --help is only recognized as the first option for the subcommand. --- Creeping featurism or useful? ISTR Mark wanted this. --- notmuch.c | 4 +++- 1 file changed, 3

[PATCH 1/2] cli: fix top level --help combined with other options

2015-03-08 Thread Jani Nikula
If the top level --help is combined with other options, help fails. For example: $ notmuch --version --help Sorry, --help is not a known command. There's not much I can do to help. Fix this by adjusting argc and argv appropriately. The help command ignores argv[0] anyway, so we don't

[PATCH 1/2] cli: fix top level --help combined with other options

2015-03-08 Thread Jani Nikula
If the top level --help is combined with other options, help fails. For example: $ notmuch --version --help Sorry, --help is not a known command. There's not much I can do to help. Fix this by adjusting argc and argv appropriately. The help command ignores argv[0] anyway, so we don't

[PATCH 2/2] cli: add support for notmuch command --help

2015-03-08 Thread Jani Nikula
Recognize 'notmuch command --help' at the top level as a special case, and show help for the command. Note that for simplicity, --help is only recognized as the first option for the subcommand. --- Creeping featurism or useful? ISTR Mark wanted this. --- notmuch.c | 4 +++- 1 file changed, 3

[PATCH 2/2] CLI: make gpg binary used by libgmime configurable.

2015-03-07 Thread Jani Nikula
On Tue, 09 Dec 2014, David Bremner wrote: > Previously we set up a way for the top level notmuch command to choose > which gpg binary was invoked by libgmime. In this commit we add the > (mostly boilplate) code to allow the notmuch-config command to read > and write this path, and use it in the

[PATCH 1/2] CLI: set up infrastructure to make path to gpg configurable.

2015-03-07 Thread Jani Nikula
On Tue, 09 Dec 2014, David Bremner wrote: > GMIME takes a path to gpg, but we hardcode that path. In this commit > we push hardcoding all the way up to the top level of a notmuch > command, where we can later make it configurable. Mmmh, to be pedantic, this does not push the hardcoding to the

[PATCH 1/2] lib: define DEPRECATED macro, document its use.

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner wrote: > This has been tested with gcc and clang. > --- > devel/STYLE | 10 ++ > doc/doxygen.cfg | 2 +- > lib/notmuch.h | 2 ++ > 3 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/devel/STYLE b/devel/STYLE > index

[PATCH] lib: bump library minor version

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner wrote: > This should have happened in commit 326e18856, but it didn't. LGTM. > --- > lib/notmuch.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/notmuch.h b/lib/notmuch.h > index 3e326bf..f0b60b8 100644 > --- a/lib/notmuch.h >

[PATCH 2/2] man: fix notmuch-emacs-mua environment section

2015-03-07 Thread Jani Nikula
It's emacsclient command, not comment. Document default values. While at it, format the environment section similarly to other man pages. --- doc/man1/notmuch-emacs-mua.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst

[PATCH 1/2] notmuch-emacs-mua: remove -C to keep short options compatible with mutt

2015-03-07 Thread Jani Nikula
Notmuch uses long options exclusively all around. The short options in notmuch-emacs-mua are intentionally just a compatible subset of mutt(1). Keep it this way, if only to make documenting the fact easy! The Notmuch style --client long option remains, of course. ---

[PATCH] notmuch-emacs-mua: more options, some fixes

2015-03-07 Thread Jani Nikula
acs-mua > @@ -1,4 +1,5 @@ > #!/usr/bin/env bash > +# -*- mode: shell-script; sh-basic-offset: 4; tab-width: 8 -*- > # > # notmuch-emacs-mua - start composing a mail on the command line > # > @@ -18,25 +19,47 @@ > # along with this program. If not, see http://www.gnu.o

[PATCH 2/4] cli: update to use new count API

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner wrote: > Essentially replace each call to notmuch_count_* with an if block. LGTM, nitpicks inline. > --- > notmuch-count.c | 14 -- > notmuch-reply.c | 8 +++- > notmuch-search.c | 14 -- > notmuch-show.c | 8 +++- > 4

[PATCH 1/4] lib: add versions of notmuch_query_count_{message, threads} with status return

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner wrote: > Although I think it's a pretty bad idea to continue using the old API, > this allows both a more gentle transition for clients of the library, > and allows us to break one monolithic change into a series We should probably bump LIBNOTMUCH_MINOR_VERSION

[RFC] lib: add support for date:..! to mean date:..

2015-03-07 Thread Jani Nikula
Up to debate: 1) Is something like this useful at all as an intermediate step before we can have support for date:? (This can be done with a future version of Xapian, or with a custom query query parser.) 2) If yes, are there better alternatives to "!" as the end point? (Or should the special

[PATCH] completion: complete addresses in from:/to: search terms

2015-03-07 Thread Jani Nikula
Use the new notmuch address command to do completion for addresses in from: and to:. Use --output=sender for both for efficiency, even though --output=recipients would be more accurate for to: prefix completion. --- This is v2 of id:1422388098-16333-5-git-send-email-jani at nikula.org opting for

Re: [PATCH 2/4] cli: update to use new count API

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner da...@tethera.net wrote: Essentially replace each call to notmuch_count_* with an if block. LGTM, nitpicks inline. --- notmuch-count.c | 14 -- notmuch-reply.c | 8 +++- notmuch-search.c | 14 -- notmuch-show.c | 8

Re: [PATCH 1/2] lib: define DEPRECATED macro, document its use.

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner da...@tethera.net wrote: This has been tested with gcc and clang. --- devel/STYLE | 10 ++ doc/doxygen.cfg | 2 +- lib/notmuch.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/devel/STYLE b/devel/STYLE index

Re: [PATCH 2/2] CLI: make gpg binary used by libgmime configurable.

2015-03-07 Thread Jani Nikula
On Tue, 09 Dec 2014, David Bremner da...@tethera.net wrote: Previously we set up a way for the top level notmuch command to choose which gpg binary was invoked by libgmime. In this commit we add the (mostly boilplate) code to allow the notmuch-config command to read and write this path, and

Re: [PATCH] lib: bump library minor version

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner da...@tethera.net wrote: This should have happened in commit 326e18856, but it didn't. LGTM. --- lib/notmuch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 3e326bf..f0b60b8 100644 ---

Re: [PATCH 1/4] lib: add versions of notmuch_query_count_{message, threads} with status return

2015-03-07 Thread Jani Nikula
On Sat, 07 Mar 2015, David Bremner da...@tethera.net wrote: Although I think it's a pretty bad idea to continue using the old API, this allows both a more gentle transition for clients of the library, and allows us to break one monolithic change into a series We should probably bump

[RFC] lib: add support for date:query..! to mean date:query..query

2015-03-07 Thread Jani Nikula
Up to debate: 1) Is something like this useful at all as an intermediate step before we can have support for date:query? (This can be done with a future version of Xapian, or with a custom query query parser.) 2) If yes, are there better alternatives to ! as the end point? (Or should the special

[PATCH 2/2] man: fix notmuch-emacs-mua environment section

2015-03-07 Thread Jani Nikula
It's emacsclient command, not comment. Document default values. While at it, format the environment section similarly to other man pages. --- doc/man1/notmuch-emacs-mua.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst

[PATCH 1/2] notmuch-emacs-mua: remove -C to keep short options compatible with mutt

2015-03-07 Thread Jani Nikula
Notmuch uses long options exclusively all around. The short options in notmuch-emacs-mua are intentionally just a compatible subset of mutt(1). Keep it this way, if only to make documenting the fact easy! The Notmuch style --client long option remains, of course. ---

[PATCH] completion: complete addresses in from:/to: search terms

2015-03-07 Thread Jani Nikula
Use the new notmuch address command to do completion for addresses in from: and to:. Use --output=sender for both for efficiency, even though --output=recipients would be more accurate for to: prefix completion. --- This is v2 of id:1422388098-16333-5-git-send-email-j...@nikula.org opting for

[PATCH 4/4] parse-time-string: fix setting and rounding of seconds

2015-03-02 Thread Jani Nikula
If seconds are not specified in the string to be parsed, they're not set according to the reference time (in the no rounding case) nor rounded properly (in the rounding up cases). Fix this. The bug caused searches such as date:10:30..10:30 to match messages with date exactly 10:30:00 only, and

[PATCH 3/4] test: extract and flag second rounding tests as broken

2015-03-02 Thread Jani Nikula
Extract and add some more tests relating to rounding seconds into a separate subtest, and flag it as broken. If seconds are not specified, the time is not set or rounded according to the interface defined in parse-time-string/parse-time-string.h. Instead, seconds are always set to 00 in reality,

<    1   2   3   4   5   6   7   8   9   10   >