[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Jani Nikula
On Tue, 12 Nov 2013, Peter Zijlstra wrote: > On Tue, Nov 12, 2013 at 02:31:25PM -0500, Austin Clements wrote: >> > +/* Strip the maildir "cur", "new" directory entries. */ >> > +i = strlen(maildir); >> > +if (strncmp(maildir + i - 3, "cur", 3) == 0 || >> > + strncmp(maildir + i - 3,

[PATCH] emacs: Correct documentation of `notmuch-poll-script'

2013-11-12 Thread Austin Clements
The functions referred to in the documentation for this variable were replaced by the unified `notmuch-poll-and-refresh-this-buffer' in 21474f0e. Update the documentation to reflect the new function. --- emacs/notmuch-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-11-12 Thread Tomi Ollila
When NOTMUCH_TEST_QUIET environment variable is set to non-null value messages when new test script starts and when test PASSes are disabled. This eases picking the cases when tests FAIL (as those are still printed). --- test/README | 8 test/basic

[PATCH 2/3] test: print empty line at the beginning of test script, not at end

2013-11-12 Thread Tomi Ollila
In preparation for quiet mode print empty line before writing the test description. This is done now in function designed for it -- it will also be called when test fails. --- test/notmuch-test | 1 + test/test-lib.sh | 9 ++---

[PATCH 1/3] test: resolve `basename "$0" .sh` once for all in test-lib.sh

2013-11-12 Thread Tomi Ollila
test-lib.sh sometimes did equivalent of `basename "$0" .sh`, sometimes skipping the basename part and sometimes .sh part. This worked as we never had path components in $0 (more than ./) nor .sh ending. Now the equivalent of `basename "$0" .sh` is done once and used everywhere. In the future we

compactor adjustments

2013-11-12 Thread Tomi Ollila
On Mon, Nov 11 2013, Tomi Ollila wrote: > Hi > > I think these changes would be good to have in use before notmuch compact > is in wider usage. > > All tests pass. I plan to test all of these code paths manually tomorrow. > If anyone comes up with good plan how to add automatic tests I'll add >

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 02:31:25PM -0500, Austin Clements wrote: > > XXX: now I need to go figure out how to do searches like: > > > > subject:PATCH/0 > > > > which would mandate that PATCH is the first word occurring in the > > subject. I think the position index holds enough information but I

[PATCH v4 7/7] emacs: tree: use remap for the over-ridden global bindings

2013-11-12 Thread Mark Walters
Following a suggestion by Austin in id:20130915153642.GY1426 at mit.edu we use remap for the over-riding bindings in pick. This means that if the user modifies the global keymap these modifications will happen in the tree-view versions of them too. [tree-view overrides these to do things like

[PATCH v4 6/7] emacs: help: add a special function to deal with remaps

2013-11-12 Thread Mark Walters
remaps are a rather unusual keymap consisting of "first key" 'remap and then "second-key" the remapped-function. Thus we do the documentation for it separately. --- emacs/notmuch-lib.el | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git

[PATCH v4 5/7] emacs: help: add base-keymap

2013-11-12 Thread Mark Walters
To support key remapping in emacs help we need to know the base keymap when looking at the remapping. keep track of this while we recurse down the sub-keymaps in help. --- emacs/notmuch-lib.el |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-lib.el

[PATCH v4 4/7] emacs: help: split out notmuch-describe-key as a function

2013-11-12 Thread Mark Walters
The actual documentation function notmuch-describe-keymap was getting rather complicated so split out the code for a single key into its own function notmuch-describe-key. --- emacs/notmuch-lib.el | 42 +- 1 files changed, 25 insertions(+), 17

[PATCH v4 3/7] emacs: help: remove duplicate bindings

2013-11-12 Thread Mark Walters
If the user (or a mode) overrides a keybinding from the common keymap in one of the modes then both help lines appear in the help screen even though only one of them is applicable. Fix this by checking if we already have that key binding. We do this by constructing an list of (key . docstring)

[PATCH v4 2/7] emacs: help: save-match-data

2013-11-12 Thread Mark Walters
The routines that construct the help page in notmuch-lib rely on match-data being preserved across some fairly complicated code. This is currently valid but will not be when this series is finished. Thus place everything between the string-match and replace-match inside a save-match-data. ---

[PATCH v4 1/7] emacs: help: check for nil key binding

2013-11-12 Thread Mark Walters
A standard way to unset a key binding is local-unset-key which is equivalent to (define-key (current-local-map) key nil) Currently notmuch-help gives an error and fails if a user has done this. To fix this we only add a help line if the binding is non-nil. --- emacs/notmuch-lib.el |2 +-

[PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Mark Walters
This is v4 of this patch set. v3 is at id:1383932419-12533-1-git-send-email-markwalters1009 at gmail.com. David found a bug in v3 which I tracked down to some match-data being over-written. This included the bugfix id:1384076682-16872-1-git-send-email-markwalters1009 at gmail.com which is folded

[PATCH 8/8] emacs: Remove interactive behavior of `notmuch-tag'

2013-11-12 Thread Austin Clements
Quoth Jameson Graef Rollins on Nov 03 at 4:42 pm: > On Tue, Oct 22 2013, Austin Clements wrote: > > We no longer use this, since we've lifted all interactive behavior to > > the appropriate interactive entry points. Because of this, > > `notmuch-tag' also no longer needs to return the tag

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-11-12 Thread Austin Clements
Quoth Tomi Ollila on Nov 12 at 10:41 pm: > When NOTMUCH_TEST_QUIET environment variable is set to non-null value > messages when new test script starts and when test PASSes are disabled. > This eases picking the cases when tests FAIL (as those are still printed). > --- > test/README

[PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 12 at 8:10 pm: > This is v4 of this patch set. v3 is at > id:1383932419-12533-1-git-send-email-markwalters1009 at gmail.com. > > David found a bug in v3 which I tracked down to some match-data being > over-written. This included the bugfix >

[PATCH] Accumulated news for Austin's changes

2013-11-12 Thread Austin Clements
--- NEWS | 52 1 file changed, 52 insertions(+) diff --git a/NEWS b/NEWS index 4f3b98a..1cbca9f 100644 --- a/NEWS +++ b/NEWS @@ -17,15 +17,67 @@ New options to better support handling duplicate messages bigger than the number of matching

Arg out of range error when tagging on the search view

2013-11-12 Thread Tomi Ollila
On Tue, Nov 12 2013, Kototama wrote: > Hello, > > I'm using notmuch with the git id db5189a3b9194da55e5c311ef3fc50a72c8a7009 > > When typing M-: and executing (notmuch-search-tag "-unread") on the > search view, I get the following error in *Messages*: Why don't you just enter '-unread' in

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Peter Zijlstra
Subject: notmuch: Add "maildir:" search option The current "folder:" search terms are near useless when you have recursive folders, introduce a boolean "maildir:" search term to exactly match the maildir folder. Given a Maildir++ layout like: ~/Maildir/ ~/Maildir/cur

Arg out of range error when tagging on the search view

2013-11-12 Thread Kototama
> M-: (notmuch-search-tag '("-unread")) should work, the TAG-CHANGES is list > these days. Oh I missed that. I had some old elisp functions that broke. Thank you.

Arg out of range error when tagging on the search view

2013-11-12 Thread Kototama
Hello, I'm using notmuch with the git id db5189a3b9194da55e5c311ef3fc50a72c8a7009 When typing M-: and executing (notmuch-search-tag "-unread") on the search view, I get the following error in *Messages*: help-function-arglist: End of file during parsing Any idea? Pierre

alot: can't read sent emails, after encryption

2013-11-12 Thread apman...@idaaas.com
Hi, I have recently switched to notmuch. Thank you for it! I'm using "alot" as a frontend (thank you for it, too!). Everything works smoothly, apart from one problem: with alot, I can't figure out how to read encrypted emails I previously sent: they appear to be encrypted using the addressee's

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Austin Clements
On Tue, 12 Nov 2013, Austin Clements wrote: > I think this is a great idea. Personally I think this is how folder: > should work. I find the semantics of folder: to be useless except where > they happen to coincide with the boolean semantics used here. > Unfortunately, changing folder: would

[PATCH] notmuch: Add "maildir:" search option

2013-11-12 Thread Austin Clements
I think this is a great idea. Personally I think this is how folder: should work. I find the semantics of folder: to be useless except where they happen to coincide with the boolean semantics used here. Unfortunately, changing folder: would require versioning the database, which we have only

[PATCH] emacs: help: bugfix

2013-11-12 Thread Austin Clements
On Sun, 10 Nov 2013, Mark Walters wrote: > Hi > > David found a bug in the this remap/help series. He has a global > keybinding of "C-c s" for notmuch-search and this causes help in > tree-mode to hang. > > I have mostly diagnosed this: the problem comes that all the construct > help routines are

alot: can't read sent emails, after encryption

2013-11-12 Thread apmanine
Hi, I have recently switched to notmuch. Thank you for it! I'm using alot as a frontend (thank you for it, too!). Everything works smoothly, apart from one problem: with alot, I can't figure out how to read encrypted emails I previously sent: they appear to be encrypted using the addressee's

Arg out of range error when tagging on the search view

2013-11-12 Thread Kototama
Hello, I'm using notmuch with the git id db5189a3b9194da55e5c311ef3fc50a72c8a7009 When typing M-: and executing (notmuch-search-tag -unread) on the search view, I get the following error in *Messages*: help-function-arglist: End of file during parsing Any idea? Pierre

Re: Arg out of range error when tagging on the search view

2013-11-12 Thread Tomi Ollila
On Tue, Nov 12 2013, Kototama kotot...@gmail.com wrote: Hello, I'm using notmuch with the git id db5189a3b9194da55e5c311ef3fc50a72c8a7009 When typing M-: and executing (notmuch-search-tag -unread) on the search view, I get the following error in *Messages*: Why don't you just enter

Re: Arg out of range error when tagging on the search view

2013-11-12 Thread Kototama
M-: (notmuch-search-tag '(-unread)) should work, the TAG-CHANGES is list these days. Oh I missed that. I had some old elisp functions that broke. Thank you. ___ notmuch mailing list notmuch@notmuchmail.org

[PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Peter Zijlstra
Subject: notmuch: Add maildir: search option The current folder: search terms are near useless when you have recursive folders, introduce a boolean maildir: search term to exactly match the maildir folder. Given a Maildir++ layout like: ~/Maildir/ ~/Maildir/cur

Re: compactor adjustments

2013-11-12 Thread Tomi Ollila
On Mon, Nov 11 2013, Tomi Ollila tomi.oll...@iki.fi wrote: Hi I think these changes would be good to have in use before notmuch compact is in wider usage. All tests pass. I plan to test all of these code paths manually tomorrow. If anyone comes up with good plan how to add automatic tests

Re: [PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Austin Clements
I think this is a great idea. Personally I think this is how folder: should work. I find the semantics of folder: to be useless except where they happen to coincide with the boolean semantics used here. Unfortunately, changing folder: would require versioning the database, which we have only

[PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Mark Walters
This is v4 of this patch set. v3 is at id:1383932419-12533-1-git-send-email-markwalters1...@gmail.com. David found a bug in v3 which I tracked down to some match-data being over-written. This included the bugfix id:1384076682-16872-1-git-send-email-markwalters1...@gmail.com which is folded into

[PATCH v4 7/7] emacs: tree: use remap for the over-ridden global bindings

2013-11-12 Thread Mark Walters
Following a suggestion by Austin in id:20130915153642.gy1...@mit.edu we use remap for the over-riding bindings in pick. This means that if the user modifies the global keymap these modifications will happen in the tree-view versions of them too. [tree-view overrides these to do things like close

[PATCH v4 3/7] emacs: help: remove duplicate bindings

2013-11-12 Thread Mark Walters
If the user (or a mode) overrides a keybinding from the common keymap in one of the modes then both help lines appear in the help screen even though only one of them is applicable. Fix this by checking if we already have that key binding. We do this by constructing an list of (key . docstring)

[PATCH v4 5/7] emacs: help: add base-keymap

2013-11-12 Thread Mark Walters
To support key remapping in emacs help we need to know the base keymap when looking at the remapping. keep track of this while we recurse down the sub-keymaps in help. --- emacs/notmuch-lib.el |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-lib.el

[PATCH v4 4/7] emacs: help: split out notmuch-describe-key as a function

2013-11-12 Thread Mark Walters
The actual documentation function notmuch-describe-keymap was getting rather complicated so split out the code for a single key into its own function notmuch-describe-key. --- emacs/notmuch-lib.el | 42 +- 1 files changed, 25 insertions(+), 17

[PATCH v4 1/7] emacs: help: check for nil key binding

2013-11-12 Thread Mark Walters
A standard way to unset a key binding is local-unset-key which is equivalent to (define-key (current-local-map) key nil) Currently notmuch-help gives an error and fails if a user has done this. To fix this we only add a help line if the binding is non-nil. --- emacs/notmuch-lib.el |2 +-

[PATCH v4 6/7] emacs: help: add a special function to deal with remaps

2013-11-12 Thread Mark Walters
remaps are a rather unusual keymap consisting of first key 'remap and then second-key the remapped-function. Thus we do the documentation for it separately. --- emacs/notmuch-lib.el | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-lib.el

Re: [PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2013 at 02:31:25PM -0500, Austin Clements wrote: XXX: now I need to go figure out how to do searches like: subject:PATCH/0 which would mandate that PATCH is the first word occurring in the subject. I think the position index holds enough information but I need to

[PATCH 2/3] test: print empty line at the beginning of test script, not at end

2013-11-12 Thread Tomi Ollila
In preparation for quiet mode print empty line before writing the test description. This is done now in function designed for it -- it will also be called when test fails. --- test/notmuch-test | 1 + test/test-lib.sh | 9 ++---

[PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET variable usage

2013-11-12 Thread Tomi Ollila
When NOTMUCH_TEST_QUIET environment variable is set to non-null value messages when new test script starts and when test PASSes are disabled. This eases picking the cases when tests FAIL (as those are still printed). --- test/README | 8 test/basic

[PATCH v4 2/7] emacs: help: save-match-data

2013-11-12 Thread Mark Walters
The routines that construct the help page in notmuch-lib rely on match-data being preserved across some fairly complicated code. This is currently valid but will not be when this series is finished. Thus place everything between the string-match and replace-match inside a save-match-data. ---

Re: [PATCH] notmuch: Add maildir: search option

2013-11-12 Thread Jani Nikula
On Tue, 12 Nov 2013, Peter Zijlstra pet...@infradead.org wrote: On Tue, Nov 12, 2013 at 02:31:25PM -0500, Austin Clements wrote: +/* Strip the maildir cur, new directory entries. */ +i = strlen(maildir); +if (strncmp(maildir + i - 3, cur, 3) == 0 || + strncmp(maildir + i - 3,

[PATCH] Accumulated news for Austin's changes

2013-11-12 Thread Austin Clements
--- NEWS | 52 1 file changed, 52 insertions(+) diff --git a/NEWS b/NEWS index 4f3b98a..1cbca9f 100644 --- a/NEWS +++ b/NEWS @@ -17,15 +17,67 @@ New options to better support handling duplicate messages bigger than the number of matching

Re: [PATCH v4 0/7] emacs: help: remap keybindings

2013-11-12 Thread Austin Clements
LGTM. Quoth Mark Walters on Nov 12 at 8:10 pm: This is v4 of this patch set. v3 is at id:1383932419-12533-1-git-send-email-markwalters1...@gmail.com. David found a bug in v3 which I tracked down to some match-data being over-written. This included the bugfix

Re: alot: can't read sent emails, after encryption

2013-11-12 Thread Ruben Pollan
Quoting apman...@idaaas.com (2013-11-12 15:27:42) I have recently switched to notmuch. Thank you for it! I'm using alot as a frontend (thank you for it, too!). Everything works smoothly, apart from one problem: with alot, I can't figure out how to read encrypted emails I previously sent: they

Re: [PATCH 8/8] emacs: Remove interactive behavior of `notmuch-tag'

2013-11-12 Thread Austin Clements
Quoth Jameson Graef Rollins on Nov 03 at 4:42 pm: On Tue, Oct 22 2013, Austin Clements amdra...@mit.edu wrote: We no longer use this, since we've lifted all interactive behavior to the appropriate interactive entry points. Because of this, `notmuch-tag' also no longer needs to return the

[PATCH] emacs: Correct documentation of `notmuch-poll-script'

2013-11-12 Thread Austin Clements
The functions referred to in the documentation for this variable were replaced by the unified `notmuch-poll-and-refresh-this-buffer' in 21474f0e. Update the documentation to reflect the new function. --- emacs/notmuch-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: alot: can't read sent emails, after encryption

2013-11-12 Thread apmanine
Quoting Ruben Pollan (2013-11-13 00:01:21) Same problem here, I think what is stored is the email that was send. It will be great if alot stores it as you say with your own public gpg key. I think we should open an issue about in the alot github tracker: