[PATCH] tag: remove unused attribute from notmuch_tag_command() arguments

2012-01-28 Thread Dmitry Kurochkin
Argc and argv arguments are used in notmuch_tag_command() function. So unused attribute is not appropriate for them. --- notmuch-tag.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index 44fd61f..36b9b09 100644 --- a/notmuch-tag.c +++

Re: [PATCH] test: remove .sh extension from the recently added Emacs tests

2012-01-28 Thread David Edmondson
On Sat, 28 Jan 2012 08:47:39 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: All test files, except for the recently added Emacs tests, do not have .sh extension. So remove it from the new test files for consistency. It's fine with me, though I'll point out that they have .sh

Re: [PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Jani Nikula
I guess this now includes the optimization of doing the tagging in a single call to notmuch tag. (As opposed to calling it once per msg like it used to be a while back.) There was some discussion about the cmdline length for large threads potentially growing too big when I sent such an

Re: [PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Dmitry Kurochkin
Hi Jani. On Sat, 28 Jan 2012 11:09:45 +0200, Jani Nikula j...@nikula.org wrote: I guess this now includes the optimization of doing the tagging in a single call to notmuch tag. (As opposed to calling it once per msg like it used to be a while back.) This patch changes the code which was added

Re: [PATCH] emacs: add default value to notmuch-search-line-faces

2012-01-28 Thread Mark Walters
On Fri, 27 Jan 2012 10:37:43 +, David Edmondson d...@dme.org wrote: On Fri, 27 Jan 2012 10:29:22 +, Mark Walters markwalters1...@gmail.com wrote: I am not sure if this is the place Here or #notmuch. to ask but is there a corresponding option for colouring the summary line in

Re: [PATCH] emacs: add default value to notmuch-search-line-faces

2012-01-28 Thread Mark Walters
I wondered whether the general view is that this following trivial extension to David's notmuch-show-line-faces patch is too gross/hacky to live? It passes a fake tag of flag:match to notmuch-color-line so that the same customisation as for colouring lines based on tags can also colour based on

Re: [PATCH 0/2] Add a fake 'Tags' header

2012-01-28 Thread David Bremner
On Thu, 26 Jan 2012 18:16:27 +, David Edmondson d...@dme.org wrote: From a discussion in #notmuch, add a fake 'Tags' header when displaying messages and ensure that it's kept up to date. Hi David; Indeed this seems useful when tags are too long for the display width, but it also seems a

Re: [PATCH] emacs: globally replace non-branching (if COND (progn ... with (when ...

2012-01-28 Thread David Bremner
On Sat, 14 Jan 2012 10:17:18 +0100, Pieter Praet pie...@praet.org wrote: Less code, same results, without sacrificing readability. This looks OK, although the re-indenting makes these kind of changes painful to review (not that I'm suggesting we should re-indent, just some random complaining).

Re: [PATCH] emacs: globally replace non-branching (if COND (progn ... with (when ...

2012-01-28 Thread Jani Nikula
On Jan 28, 2012 2:41 PM, David Bremner da...@tethera.net wrote: On Sat, 14 Jan 2012 10:17:18 +0100, Pieter Praet pie...@praet.org wrote: Less code, same results, without sacrificing readability. This looks OK, although the re-indenting makes these kind of changes painful to review (not

Re: [PATCH] emacs: globally replace non-branching (if COND (progn ... with (when ...

2012-01-28 Thread David Bremner
On Sat, 28 Jan 2012 14:55:22 +0200, Jani Nikula j...@nikula.org wrote: On Jan 28, 2012 2:41 PM, David Bremner da...@tethera.net wrote: Sometimes someone (Dmitry?) sent patches that separated a small functional change, and the big non-functional indentation change it caused, separately. Would

Re: [PATCH 3/6] emacs: make + and - tagging operations more robust

2012-01-28 Thread Dmitry Kurochkin
On Sat, 28 Jan 2012 09:49:33 -0700, Jeremy Nickurak not-m...@trk.nickurak.ca wrote: Is it safe to assume that any reasonable seperator (comma, space, semicolon, plus or minus sign, anything) won't show up in a tag name? No. Threre are existing issues with tag names that contain unexpected

Re: [RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-28 Thread Austin Clements
Quoth Mark Walters on Jan 28 at 10:51 am: exclude_query = _notmuch_exclude_tags (query, final_query); - final_query = Xapian::Query (Xapian::Query::OP_AND_NOT, - final_query, exclude_query); + enquire.set_weighting_scheme

[PATCH v8 0/2] emacs: User-defined sections in notmuch-hello

2012-01-28 Thread Daniel Schoepe
Rebased against master. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v8 1/2] emacs: User-defined sections in notmuch-hello

2012-01-28 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com This patch makes the notmuch-hello screen fully customizable by allowing the user to add and remove arbitrary sections. It also provides some convenience functions for constructing sections, e.g. showing the unread message count for each tag.

[PATCH] lib: notmuch_tags_get example was not updated to reflect api change

2012-01-28 Thread Allan Wind
--- lib/notmuch.h | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 7929fe7..5e6e449 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const

Re: [PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Dmitry Kurochkin
Hi Daniel. On Sat, 28 Jan 2012 22:30:57 +0100, Daniel Schoepe dan...@schoepe.org wrote: Hi Dmitry, On Tue, 24 Jan 2012 03:07, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: There are some trailing whitespaces in the tests. those are also produced by the various notmuch-hello

Re: [PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Daniel Schoepe
Hi Dmitry. On Sun, 29 Jan 2012 02:48, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I only meant trailing whitespaces in test/emacs file in the lines added by the patch. Trailing whitespaces in expected results are obviously fine. Ah, okay. I fixed those with delete-trailing-whitespace,

Re: [RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-28 Thread Mark Walters
On Sat, 28 Jan 2012 13:33:40 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 28 at 10:51 am: exclude_query = _notmuch_exclude_tags (query, final_query); - final_query = Xapian::Query (Xapian::Query::OP_AND_NOT, -

[PATCH 1/4] Add exclude flag

2012-01-28 Thread Mark Walters
Slightly refactor the exclude code to give the callers access to the exclude query itself. There should be no functional change. --- lib/query.cc | 29 +++-- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index

[PATCH 2/4] Add exclude flag

2012-01-28 Thread Mark Walters
Make notmuch_query_search_messages set the exclude flag Exclude flag will be added to notmuch_query_search threads later. --- lib/notmuch.h |3 ++- lib/query.cc | 34 +++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/lib/notmuch.h

[PATCH 4/4] Add exclude flag

2012-01-28 Thread Mark Walters
Make notmuch-show.c respect the EXCLUDE flag. --- notmuch-show.c | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index dec799c..b55d2ba 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -193,10 +193,12 @@

[PATCH 1/2] test: auto load elisp tests file in test_emacs if available

2012-01-28 Thread Dmitry Kurochkin
This allows us to simplify shell part of tests written in elisp. --- test/test-lib.sh |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 8158328..0174e93 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -943,6 +943,12 @@

[PATCH 1/2] emacs: Add tests for quoting of MML tags in replies

2012-01-28 Thread Aaron Ecay
The test is broken at this time; the next commit will introduce a fix. --- Thanks for the reminder, Austin. Things got hectic, and it took a little bludgeoning to get the test suite to behave. I *think* I got it, although I am by no means confident. Specifically, I am seeing some unrelated(?)

[PATCH 2/2] emacs: Quote MML tags in replies

2012-01-28 Thread Aaron Ecay
Emacs message-mode uses certain text strings to indicate how to attach files to outgoing mail. If these are present in the text of an email, and a user is tricked into replying to the message, the user’s files could be exposed. --- NEWS | 18 ++

[PATCH 1/6] emacs: move tag format validation to `notmuch-tag' function

2012-01-28 Thread Dmitry Kurochkin
Before the change, tag format validation was done in `notmuch-search-operate-all' function only. The patch moves it down to `notmuch-tag', so that all users of that function get input validation. --- emacs/notmuch.el | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff

[PATCH 2/6] emacs: remove text properties from `notmuch-search-get-tags' result

2012-01-28 Thread Dmitry Kurochkin
--- emacs/notmuch.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 84d7d0a..ff46617 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -577,7 +577,7 @@ the messages that were tagged" (let ((beg (+ (point) 1)))

[PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-28 Thread Dmitry Kurochkin
Before the change, "+" and "-" tagging operations in notmuch-search and notmuch-show views accepted only a single tag. The patch makes them use the recently added `notmuch-select-tags-with-completion' function, which allows to enter multiple tags with "+" and "-" prefixes. So after the change,

[PATCH 4/6] test: fix emacs tests after tagging operations changes

2012-01-28 Thread Dmitry Kurochkin
After the recent tagging operations changes, functions bound to "+" and "-" in notmuch-search and notmuch-show views always read input from the minibuffer. Use kbd macros instead of calling them directly. --- test/emacs | 20 ++-- 1 files changed, 10 insertions(+), 10

[PATCH 5/6] emacs: add "*" binding for notmuch-show view

2012-01-28 Thread Dmitry Kurochkin
The patch adds `notmuch-show-operate-all' function bound to "*" in notmuch-show view. The function is similar to the `notmuch-search-operate-all' function for the notmuch-search view: it changes tags for all messages in the current thread. --- emacs/notmuch-show.el | 16 1

[PATCH 6/6] emacs: separate history for operations which accept single and multiple tags

2012-01-28 Thread Dmitry Kurochkin
Some tag-related operations accept a single tag without prefix (`notmuch-select-tag-with-completion'), others accept multiple tags prefixed with '+' or '-' (`notmuch-select-tags-with-completion'). Before the change, both functions used a single default minibuffer history. This is inconvenient

[PATCH] test: remove ".sh" extension from the recently added Emacs tests

2012-01-28 Thread Dmitry Kurochkin
All test files, except for the recently added Emacs tests, do not have ".sh" extension. So remove it from the new test files for consistency. --- test/emacs-address-cleaning| 18 ++ test/emacs-address-cleaning.sh | 18 -- test/emacs-test-functions |

[PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function

2012-01-28 Thread Dmitry Kurochkin
The tag syntax check in `notmuch-tag' function was too strict and did not allow nmbug tags with "::". Since the check is done for all tagging operations in Emacs UI, this basically means that no nmbug tags can be changed. The patch relaxes the tag syntax check to allow any tag names that do not

[PATCH 1/3] emacs: Stop the `truncate-string-to-width' madness.

2012-01-28 Thread Austin Clements
Quoth David Edmondson on Jan 25 at 1:48 pm: > There's no need to call `truncate-string-to-width' twice in this code > path. LGTM if what I point out below is okay. Technically this changes the behavior of this code, but what it did before was obviously wrong (if you do roll a new version, I'd

[PATCH 3/3] emacs: Prefer '[No Subject]' to blank subjects.

2012-01-28 Thread Austin Clements
LGTM other than what Mark pointed out about this not applying to subjects in the search buffer. Quoth David Edmondson on Jan 25 at 1:48 pm: > --- > emacs/notmuch-lib.el |6 ++ > emacs/notmuch-print.el |8 ++-- > emacs/notmuch-show.el |5 - > emacs/notmuch.el |

[PATCH] test: remove ".sh" extension from the recently added Emacs tests

2012-01-28 Thread Austin Clements
Quoth Dmitry Kurochkin on Jan 28 at 8:47 am: > All test files, except for the recently added Emacs tests, do not have > ".sh" extension. So remove it from the new test files for consistency. LGTM.

[PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Dmitry Kurochkin
Before the change, `notmuch-show-operate-all' used thread id for "notmuch tag" search. This could result in tagging unexpected messages that were added to the thread after the notmuch-show buffer was created. The patch changes `notmuch-show-operate-all' to use ids of shown messages to fix this.

[PATCH 9/6] emacs: code cleanup in `notmuch-show-operate-all', no functional changes

2012-01-28 Thread Dmitry Kurochkin
Use `notmuch-show-mapc' function instead of a custom `loop'. --- emacs/notmuch-show.el | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e606224..4ec3fce 100644 --- a/emacs/notmuch-show.el +++

[PATCH] tag: remove unused attribute from notmuch_tag_command() arguments

2012-01-28 Thread Dmitry Kurochkin
Argc and argv arguments are used in notmuch_tag_command() function. So unused attribute is not appropriate for them. --- notmuch-tag.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index 44fd61f..36b9b09 100644 --- a/notmuch-tag.c +++

[PATCH] test: remove ".sh" extension from the recently added Emacs tests

2012-01-28 Thread David Edmondson
: <http://notmuchmail.org/pipermail/notmuch/attachments/20120128/ccf06445/attachment.pgp>

[PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function

2012-01-28 Thread Jani Nikula
notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120128/becb7637/attachment.html>

[PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Jani Nikula
(apply 'notmuch-tag (notmuch-show-get-messages-ids-search) changed-tags) > (save-excursion > (goto-char (point-min)) > (loop do (let* ((current-tags (notmuch-show-get-tags)) > -- > 1.7.8.3 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120128/def85d4b/attachment-0001.html>

[PATCH 8/6] emacs: use message ids instead of thread id in `notmuch-show-operate-all'

2012-01-28 Thread Dmitry Kurochkin
Hi Jani. On Sat, 28 Jan 2012 11:09:45 +0200, Jani Nikula wrote: > I guess this now includes the optimization of doing the tagging in a single > call to notmuch tag. (As opposed to calling it once per msg like it used to > be a while back.) This patch changes the code which was added few patches

[PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function

2012-01-28 Thread Dmitry Kurochkin
On Sat, 28 Jan 2012 10:56:21 +0200, Jani Nikula wrote: > On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" > wrote: > > > > The tag syntax check in `notmuch-tag' function was too strict and did > > not allow nmbug tags with "::". Since the check is done for all > > tagging operations in Emacs UI,

[RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-28 Thread Mark Walters
> > exclude_query = _notmuch_exclude_tags (query, final_query); > > > > - final_query = Xapian::Query (Xapian::Query::OP_AND_NOT, > > -final_query, exclude_query); > > + enquire.set_weighting_scheme (Xapian::BoolWeight()); > > + enquire.set_query

[PATCH] emacs: add default value to notmuch-search-line-faces

2012-01-28 Thread Mark Walters
On Fri, 27 Jan 2012 10:37:43 +, David Edmondson wrote: > On Fri, 27 Jan 2012 10:29:22 +, Mark Walters gmail.com> wrote: > > I am not sure if this is the place > > Here or #notmuch. > > > to ask but is there a corresponding option for colouring the summary > > line in notmuch-show

[PATCH] emacs: add default value to notmuch-search-line-faces

2012-01-28 Thread Mark Walters
I wondered whether the general view is that this following trivial extension to David's notmuch-show-line-faces patch is too gross/hacky to live? It passes a fake tag of "flag:match" to notmuch-color-line so that the same customisation as for colouring lines based on tags can also colour based on

[PATCH] uncrustify.cfg: comments and more types

2012-01-28 Thread David Bremner
On Wed, 25 Jan 2012 23:37:45 +0200, Tomi Ollila wrote: > Changes to devel/uncrustify.cfg: I'm not sure why (because there should not be intervening changes), but this does not apply to current master. From git am -3, I get , | Using index info to reconstruct a base tree... | :49: trailing

[PATCH 0/2] Add a fake 'Tags' header

2012-01-28 Thread David Bremner
On Thu, 26 Jan 2012 18:16:27 +, David Edmondson wrote: > From a discussion in #notmuch, add a fake 'Tags' header when > displaying messages and ensure that it's kept up to date. Hi David; Indeed this seems useful when tags are too long for the display width, but it also seems a bit

[PATCH] emacs: globally replace non-branching "(if COND (progn ..." with "(when ..."

2012-01-28 Thread David Bremner
On Sat, 14 Jan 2012 10:17:18 +0100, Pieter Praet wrote: > Less code, same results, without sacrificing readability. > This looks OK, although the re-indenting makes these kind of changes painful to review (not that I'm suggesting we should re-indent, just some random complaining). d

[PATCH 2/2] added support for user-specified directories to exclude

2012-01-28 Thread Fabio Zanini
On Fri, Jan 27, 2012 at 12:41:18PM +0200, Tomi Ollila wrote: > It's easy to combine works together, but more difficult is to choose best > terminology: database.exclude vs. new.ignore (or something in between or > totally different). Ideas anyone? I would opt for including two mechanisms for

[PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-28 Thread Jeremy Nickurak
Is it safe to assume that any reasonable seperator (comma, space, semicolon, plus or minus sign, anything) won't show up in a tag name? On Fri, Jan 27, 2012 at 21:41, Dmitry Kurochkin wrote: > Before the change, "+" and "-" tagging operations in notmuch-search > and notmuch-show views accepted

[PATCH] emacs: globally replace non-branching "(if COND (progn ..." with "(when ..."

2012-01-28 Thread David Bremner
On Sat, 28 Jan 2012 14:55:22 +0200, Jani Nikula wrote: > On Jan 28, 2012 2:41 PM, "David Bremner" wrote: > > Sometimes someone (Dmitry?) sent patches that separated a small functional > change, and the big non-functional indentation change it caused, > separately. Would you prefer (or tolerate

[PATCH 3/6] emacs: make "+" and "-" tagging operations more robust

2012-01-28 Thread Dmitry Kurochkin
On Sat, 28 Jan 2012 09:49:33 -0700, Jeremy Nickurak wrote: > Is it safe to assume that any reasonable seperator (comma, space, > semicolon, plus or minus sign, anything) won't show up in a tag name? > No. Threre are existing issues with tag names that contain "unexpected" characters. This

[RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-28 Thread Austin Clements
Quoth Mark Walters on Jan 28 at 10:51 am: > > > > exclude_query = _notmuch_exclude_tags (query, final_query); > > > > > > - final_query = Xapian::Query (Xapian::Query::OP_AND_NOT, > > > - final_query, exclude_query); > > > + enquire.set_weighting_scheme

[PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Daniel Schoepe
hment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120128/3d7e675c/attachment.pgp>

[PATCH v8 0/2] emacs: User-defined sections in notmuch-hello

2012-01-28 Thread Daniel Schoepe
Rebased against master.

[PATCH v8 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Daniel Schoepe
From: Daniel Schoepe --- test/emacs | 37 test/emacs.expected-output/notmuch-hello |3 +- .../notmuch-hello-new-section |4 ++ .../notmuch-hello-no-saved-searches

[PATCH v8 1/2] emacs: User-defined sections in notmuch-hello

2012-01-28 Thread Daniel Schoepe
From: Daniel Schoepe This patch makes the notmuch-hello screen fully customizable by allowing the user to add and remove arbitrary sections. It also provides some convenience functions for constructing sections, e.g. showing the unread message count for each tag.

[PATCH] lib: notmuch_tags_get example was not updated to reflect api change

2012-01-28 Thread Allan Wind
--- lib/notmuch.h | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 7929fe7..5e6e449 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const

[PATCH v7 2/2] emacs: Tests for user-defined sections

2012-01-28 Thread Daniel Schoepe
A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120128/444230f5/attachment.pgp>

[RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-28 Thread Mark Walters
On Sat, 28 Jan 2012 13:33:40 -0500, Austin Clements wrote: > Quoth Mark Walters on Jan 28 at 10:51 am: > > > > > > exclude_query = _notmuch_exclude_tags (query, final_query); > > > > > > > > - final_query = Xapian::Query (Xapian::Query::OP_AND_NOT, > > > > -