Bug in remote use of notmuch

2010-11-10 Thread Mark Walters
I am experimenting with using notmuch remotely over ssh (as in the NEWS file; i.e. with a script containing ssh u...@host notmuch $@) This is mostly excellent but it seems to get confused by some queries. For example those containing brackets or just consisting of *. I think this is a problem with

[PATCH 0/2] Implement reply to sender

2011-05-26 Thread Mark Walters
first submission to the project so I hope that I have done everything right. Signed-off-by: Mark Walters markwalters1...@gmail.com Mark Walters (2): Command line changes for reply-to-sender Emacs changes for reply to sender emacs/notmuch-mua.el |6 -- emacs/notmuch-show.el |6

[PATCH 2/2] Emacs changes for reply to sender

2011-05-26 Thread Mark Walters
Reply to sender is currently bound to R --- emacs/notmuch-mua.el |6 -- emacs/notmuch-show.el |6 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index dc7b386..4b8590f 100644 --- a/emacs/notmuch-mua.el +++

[PATCH 1/2] Command line changes for reply-to-sender

2011-05-26 Thread Mark Walters
Adds the format --format=one to possible reply formats which only replies to the sender. More precisely the function follows these rules: reply only to sender unless it was the user reply only to all people on the to line unless they were all the user reply to all people on the cc line The most

[PATCH v2 0/3] Implement reply to sender

2011-05-26 Thread Mark Walters
line this is done via a new option to notmuch-reply: --reply-to=(sender|all) with all being the default (as suggested). In emacs it is bound to the key R. (Note it does not touch the reply to thread command from notmuch-search: it is unclear to me what reply to sender would mean there.) Mark Walters

[PATCH v2 2/3] Documentation changes for --reply-to= option to notmuch reply.

2011-05-26 Thread Mark Walters
--- notmuch.1 | 13 + notmuch.c | 10 ++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/notmuch.1 b/notmuch.1 index a1c7fa8..c434e77 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -388,6 +388,19 @@ Includes subject and quoted message body. .BR headers\-only

[PATCH v2 3/3] Emacs changes for reply to sender

2011-05-26 Thread Mark Walters
Reply to sender is currently bound to R --- emacs/notmuch-mua.el | 10 ++ emacs/notmuch-show.el |8 +++- emacs/notmuch.el |2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 61a723b..c9c5854 100644

Possible bug: wrong from address when forwarding

2011-07-01 Thread Mark Walters
Hi I am seeing the following bug in the emacs interface: when I forward a message (f when showing a message) I get a message with the from address filled in by the host operating system (walters@hostname) rather than my notmuch configured address. If I compose mail normally notmuch fills in the

RFC/PATCH emacs attachment handling

2011-09-06 Thread Mark Walters
Hello I have modified the emacs interface for handling attachments by adding a keymap to the attachment button. For example pressing v when on an attachment button views the attachment (using the mailcap method) and pressing s saves the attachment. I find this makes it a lot easier when dealing

Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-01 Thread Mark Walters
Hello When I try and run the tests on my (fairly standard) debian stable system they hang after PASS Search message: json, utf-8. This is with latest git (07768fb1bb50e) and emacs 23.2.1. As far as I can see emacs is not exiting when sent the (kill-emacs) command from test-lib.sh (line 931

Re: Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Mark Walters
On Tue, 03 Jan 2012 15:07:04 +0200, Tomi Ollila tomi.oll...@nixu.com wrote: I did some more testing; doing emacsclient --eval '(defun yes-or-no-p (prompt) t)' --eval '(kill-emacs)' Will make emacs 23.2.1 exit also, so IMO this workaround could be used to fix the problem. I can confirm

Re: [PATCH 0/4] notmuch reply bugfix reply to sender only

2012-01-05 Thread Mark Walters
Hello Bikeshedding topic #1: How about making replying to just the sender the default in notmuch reply, and having --reply-all option (instead of --no-reply-all)? In id:87pqn5cg4g@yoom.home.cworth.org cworth suggested using --reply-to=sender vs. --reply-to=all (keeping the latter the

Exporting mime email

2012-01-05 Thread Mark Walters
Hello What is the best way of exporting/saving as text a mime-encoded email from the emacs interface (e.g, if I want to save a mime-encoded email containing a patch)? For non-mime emails View-raw is fine, but with mime encoded emails such as (picked pretty much at random)

Re: Exporting mime email

2012-01-05 Thread Mark Walters
Hi On Thu, 05 Jan 2012 16:44:10 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: On Fri, 06 Jan 2012 00:29:39 +, Mark Walters markwalters1...@gmail.com wrote: What is the best way of exporting/saving as text a mime-encoded email from the emacs interface (e.g, if I want

Re: Exporting mime email

2012-01-06 Thread Mark Walters
Hello On Fri, 06 Jan 2012 08:35:27 +, David Edmondson d...@dme.org wrote: On Fri, 06 Jan 2012 00:29:39 +, Mark Walters markwalters1...@gmail.com wrote: What is the best way of exporting/saving as text a mime-encoded email from the emacs interface (e.g, if I want to save a mime

Re: Exporting mime email

2012-01-06 Thread Mark Walters
Hi Presumably something is converting it from 8bit to base64 along the path. If it makes a difference my setup is gmail-offlineimap-notmuch I scouted around for other messages that include © (which is what I presume causes the encoding), but the ones I have are all still 8bit. A

Re: [PATCH 0/4] notmuch reply bugfix reply to sender only

2012-01-06 Thread Mark Walters
That is a very good point, and one that my patch fails to address. (*) I have a version of that patch-set which applies to master if that would be useful to anyone, and I recently started writing tests in preparation for re-submitting. Ah, it's old, no wonder I didn't know about it.

[PATCH 1/4] Add the option --reply-to to notmuch reply.

2012-01-06 Thread Mark Walters
Possible values for this option are sender which replies just to sender and all (the default). More precisely reply to sender follows these rules: reply only to sender unless it was the user reply only to all people on the to line unless they were all the user reply to all

[PATCH 3/4] Emacs changes for reply-to-sender

2012-01-06 Thread Mark Walters
Reply to sender is currently bound to R --- emacs/notmuch-mua.el |8 +--- emacs/notmuch-show.el |8 +++- emacs/notmuch.el |2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 7114e48..7171210 100644

[PATCH 4/4] add tests for reply-to-sender

2012-01-06 Thread Mark Walters
--- test/notmuch-test|1 + test/reply-to-sender | 209 ++ 2 files changed, 210 insertions(+), 0 deletions(-) create mode 100755 test/reply-to-sender diff --git a/test/notmuch-test b/test/notmuch-test index e40ef86..6a99ae3 100755 ---

Re: [PATCH 1/4] cli: fix use of uninitialized variable in notmuch reply

2012-01-07 Thread Mark Walters
Hello I do not get the failure with just 1/4 applied but do with all 4 applied. The trivial patch below fixes it, but it might not be the best solution. The failure occurs because Jani's patch changes the behavior of a couple of emacs/notmuch internal functions: the function

Re: [PATCH 1/4] Add the option --reply-to to notmuch reply.

2012-01-08 Thread Mark Walters
On Sun, 08 Jan 2012 14:47:33 +0200, Jani Nikula j...@nikula.org wrote: + /* We add the addresses if we are replying to all or we have not yet found +* a non-user address. We have to keep parsing to make sure we do find the +* correct from address for the user, but we pass a

Re: [PATCH v2 3/6] cli: add support for replying just to the sender in notmuch reply

2012-01-08 Thread Mark Walters
I like this version (of the whole series) but have two queries. (Note I haven't actually tried it out yet: I have just been reading the code.) + /* Force recipient type in reply-to-sender mode just in case replying to + * user's own message finds recipients in Cc/Bcc fields only. +

Re: [PATCH v2 3/6] cli: add support for replying just to the sender in notmuch reply

2012-01-09 Thread Mark Walters
The reply-to-thread is a rare case anyway, regardless of reply-to-all or reply-to-sender, and even the current implementation does not gather all the recipients from all the messages. Try it out, it seems to me it does not quite do what you think it does. IMHO it should use oldest-first

Re: [PATCH] emacs: call notmuch tag only once when archiving a thread

2012-01-09 Thread Mark Walters
There's been quite a bit of discussion on fixing this properly. See, for example id:CAH-f9WsPj=1Eu=g3soepjgctbfs6hrldlq18xmenj8az00y...@mail.gmail.com. The gist is that we need to include message IDs (or document IDs) in the search output and use these in tagging operations, rather than the

Re: [PATCH v4 1/5] cli: slightly refactor notmuch reply address scanning functions

2012-01-12 Thread Mark Walters
This is nice. Two very minor nits: In your commit message you say Add support for not adding messages at all (just scan for user from address), and returning the number of messages added. and I think both messages should recipients. + * If 'user_from' is non-NULL and *user_from is NULL,

Re: [PATCH v4 2/5] cli: add support for replying just to the sender in notmuch reply

2012-01-12 Thread Mark Walters
LGTM Best wishes Mark ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 0/1] emacs: allow viewing as well saving individual attachments

2012-01-15 Thread Mark Walters
wishes Mark Mark Walters (1): Make buttons for attachments allow viewing as well as saving emacs/notmuch-show.el | 81 ++-- 1 files changed, 64 insertions(+), 17 deletions(-) -- 1.7.2.3 ___ notmuch

[PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-15 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

[PATCH v2] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-16 Thread Mark Walters
(My apologies, owing to various errors on my part the patch has ended up in a separate thread: id:1326749910-30437-1-git-send-email-markwalters1...@gmail.com) On Mon, 16 Jan 2012 11:31:16 -0800, Jameson Graef Rollins jroll...@finestructure.net wrote: Keymap on a button is: s for save, v for

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
I wonder if the problem comes from me doing things in a non-lispy fashion (I am completely new to lisp). Thus notmuch-show-part-button-default-action is a variable that gets passed around rather than a function. Sorry, I should have looked at the bigger context in this patch. I think

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
I have included my current draft along these lines. I think it is working but I am not submitting yet: just asking if this is the right idea. Best wishes Mark From 9e52414b9871369c1cbb5c3e72d833b56bb236d4 Mon Sep 17 00:00:00 2001 From: Mark Walters markwalters1...@gmail.com Date: Sat, 14 Jan

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
-binary-file.) However, this is about 50 lines of lisp so I am not sure it is worth it. Best wishes Mark From bda4bb7637fb7d09c50f95b6b76fd42a377e0dde Mon Sep 17 00:00:00 2001 From: Mark Walters markwalters1...@gmail.com Date: Sat, 14 Jan 2012 18:04:22 + Subject: [PATCH] Make buttons

Re: [PATCH 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
Oops, actually there was a bug in that macro. It should have been (defmacro notmuch-with-temp-part-buffer (message-id nth rest body) (declare (indent 2)) (let ((process-crypto (make-symbol process-crypto))) `(let ((,process-crypto notmuch-show-process-crypto))

[PATCH v3] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

Re: [PATCH v3] Make buttons for attachments allow viewing as well as saving

2012-01-17 Thread Mark Walters
Oof, sorry. Two more tweaks that I really should have caught in the previous version. After that this gets my automatic +1. Both fixed. I have also fixed the bug I mentioned (missing filename when view falls back on save); I couldn't make it work with the no-default option. However

Re: [PATCH v3] Make buttons for attachments allow viewing as well as saving

2012-01-18 Thread Mark Walters
+(defun notmuch-show-view-part (message-id nth optional filename content-type ) + (notmuch-with-temp-part-buffer message-id nth +;; set mm-inlined-types to nil to force an external viewer +(let ((handle (mm-make-handle (current-buffer) (list content-type))) +

Re: [PATCH v3 2/2] search: Support automatic tag exclusions

2012-01-19 Thread Mark Walters
On Thu, 19 Jan 2012 20:06:27 +, markwalters1...@gmail.com wrote: I would actually like make a different suggestion: extend auto_exclude_tags to notmuch-show as well. I was quite surprised to see my deleted (ie hidden rather than actually deleted) messages return when viewing a

[PATCH v4 0/1]

2012-01-19 Thread Mark Walters
robust to changes in mm-decode. I would like to thank him for all his other help improving my original patch. It passes the test-suite and all cases I can think of work correctly. Best wishes Mark Mark Walters (1): Make buttons for attachments allow viewing as well as saving emacs

[PATCH v4 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-19 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

Re: [PATCH v4 0/1]

2012-01-19 Thread Mark Walters
Sorry this should have been in-reply-to id:20120118192147.gf16...@mit.edu Mark ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH v3 2/2] search: Support automatic tag exclusions

2012-01-19 Thread Mark Walters
I am happy with them appearing as a non matching message, but currently they appear as a full open message. (The patch to achieve this is trivial: essentially transpose part of Austin's patch of notmuch-search.c into notmuch-show.c) This definitely sounds like the right thing to do.

[PATCH] Automatically exclude tags in notmuch-show

2012-01-19 Thread Mark Walters
Add the use of auto_exclude_tags in notmuch-show.c. As with Austin's patch (commit 42a907992823030f070fc395a174f779998ca6f5) it just adds the excluded tags to the query so the excluded messages will still appear in the emacs interface, but as a single header line rather than as a matching

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-19 Thread Mark Walters
Ok Having said this is trivial I have found a problem. What should notmuch do if you do something like notmuch show id:some-id and that message is marked with a deleted tag? To be consistent with the other cases (where a deleted message is in a matched thread) we might want to return the message

Re: [PATCH v4 1/1] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
On Thu, 19 Jan 2012 23:30:23 -0500, Austin Clements amdra...@mit.edu wrote: One indentation nit and then this LGTM. + (lexical-let ((message-id message-id) + (nth nth) + (filename filename) + (content-type content-type)) +

[PATCH v5] Make buttons for attachments allow viewing as well as saving

2012-01-20 Thread Mark Walters
Define a keymap for attachment buttons to allow multiple actions. Define 3 possible actions: save attachment: exactly as currently, view attachment: uses mailcap entry, view attachment with user chosen program Keymap on a button is: s for save, v for view and o for view with other

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-21 Thread Mark Walters
On Fri, 20 Jan 2012 12:18:01 -0500, Austin Clements amdra...@mit.edu wrote: Oh dear. Well, here's one idea. Instead of doing a single thread query in show, do a thread query without the exclusions and then a message query with the exclusions. Output all of the messages from the first

Re: [PATCH v4 2/3] emacs: `notmuch-show-buttonize-links' only `notmuch-show's a message if it exists

2012-01-22 Thread Mark Walters
* emacs/notmuch-show.el (notmuch-show-if-found): new function that only shows a message/thread if present in the database and otherwise returns an error. I like this in principle but it interacts awkwardly with the automatic tag exclusion. If the id:message-id matches a message with an

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-22 Thread Mark Walters
On Sun, 22 Jan 2012 13:16:09 -0500, Austin Clements amdra...@mit.edu wrote: Quoth myself on Jan 20 at 12:18 pm: Quoth Mark Walters on Jan 20 at 12:10 am: Ok Having said this is trivial I have found a problem. What should notmuch do if you do something like notmuch show id:some

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-22 Thread Mark Walters
On Sun, 22 Jan 2012 13:16:09 -0500, Austin Clements amdra...@mit.edu wrote: Quoth myself on Jan 20 at 12:18 pm: Quoth Mark Walters on Jan 20 at 12:10 am: Ok Having said this is trivial I have found a problem. What should notmuch do if you do something like notmuch show id:some

Re: [PATCH] Automatically exclude tags in notmuch-show

2012-01-24 Thread Mark Walters
On Sun, 22 Jan 2012 20:52:22 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 23 at 1:13 am: On Sun, 22 Jan 2012 13:16:09 -0500, Austin Clements amdra...@mit.edu wrote: Quoth myself on Jan 20 at 12:18 pm: Quoth Mark Walters on Jan 20 at 12:10 am

[RFC PATCH 1/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-24 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

[RFC PATCH 2/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-24 Thread Mark Walters
Form excluded doc_ids set and use that to exclude messages. Should be no functional change. --- lib/notmuch-private.h |1 + lib/query.cc | 28 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h

[RFC PATCH 3/4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-01-24 Thread Mark Walters
Add the actual NOTMUCH_MESSAGE_FLAG_EXCLUDED flag. --- lib/notmuch-private.h |1 + lib/notmuch.h |3 ++- lib/query.cc | 11 +++ lib/thread.cc | 14 ++ 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/notmuch-private.h

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

2012-01-24 Thread Mark Walters
On Mon, 23 Jan 2012 21:45:21 -0500, Austin Clements amdra...@mit.edu wrote: The overall structure of this series looks great. There's obviously a lot of clean up to do, but I'll reply with a few high-level comments. Quoth Mark Walters on Jan 24 at 1:18 am: Form excluded doc_ids set

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

2012-01-27 Thread Mark Walters
Add default value to notmuch-search-line-faces to show unread messages in bold, and flagged messages in red, to have some visual indication of important messages in search results. This should be helpful for new users. I am not sure if this is the place to ask but is there a corresponding

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

2012-01-27 Thread Mark Walters
I am very much not a lisp expert but for what it's worth I read/reviewed the patches and like them with a couple of minor queries that I am happy to be overruled on The patch 1/3 seems to set the show buffer line to *[No Subject]* where it used to be just [No Subject]. (I have no preference: I

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

2012-01-27 Thread Mark Walters
: On Fri, 27 Jan 2012 10:23:07 +, Mark Walters m.walt...@qmul.ac.uk wrote: I am very much not a lisp expert Me neither, so please do continue to review stuff. The patch 1/3 seems to set the show buffer line to *[No Subject]* where it used to be just [No Subject]. (I have no preference: I

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

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: [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/7] cli: add --do-not-exclude option to count and search.

2012-01-29 Thread Mark Walters
This option turns off the exclusion so all matching messages are returned. We do not need to add this to show as notmuch-show does not (yet) exclude. --- notmuch-count.c | 12 notmuch-search.c | 12 2 files changed, 16 insertions(+), 8 deletions(-) diff --git

[PATCH 2/7] lib: Rearrange the exclude code in query.cc

2012-01-29 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 3/7] lib: Make notmuch_query_search_messages set the exclude flag

2012-01-29 Thread Mark Walters
Add a flag NOTMUCH_MESSAGE_FLAG_EXCLUDED which is set by notmuch_query_search_messages for excluded messages. Also add an option omit_excluded_messages to the search that we do not want the excludes at all. This exclude flag will be added to notmuch_query_search threads in the next patch. ---

[PATCH 4/7] lib: Add the exclude flag to notmuch_query_search_threads

2012-01-29 Thread Mark Walters
Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to notmuch_query_search_threads. Implemented by inspecting the tags directly in _notmuch_thread_create/_thread_add_message rather than as a Xapian query for speed reasons. --- lib/notmuch-private.h | 16 ++-- lib/query.cc |1 +

[PATCH 5/7] cli: Make notmuch-show respect excludes.

2012-01-29 Thread Mark Walters
This adds the excludes to notmuch-show.c. We do not exclude when only a single message (or part) is requested. notmuch-show will output the exclude information when either text or json format is requested. As this changes the output from notmuch-show it breaks many tests (in a trivial and expected

[PATCH 6/7] cli: omit excluded messages in results where appropriate.

2012-01-29 Thread Mark Walters
In all cases of notmuch count/search/show where the results returned cannot reflect the exclude flag return just the matched not-excluded results. If the caller wishes to have all the matched results (i.e., including the excluded ones) they should call with the --do-not-exclude option. The

[PATCH 7/7] emacs: show: recognize the exclude flag.

2012-01-29 Thread Mark Walters
Show mode will recognize the exclude flag by not opening excluding messages by default, and will start at the first matching non-excluded message. If there are no matching non-excluded messages it will go to the first matching (necessarily excluded) message. --- emacs/notmuch-show.el | 18

Bug: emacs 23.2 doesn't like ido-completing-read

2012-01-29 Thread Mark Walters
Hello I have been experimenting with notmuch-always-prompt-for-sender on my debian stable setup (emacs 23.2.1) and it doesn't like ido-completing-read. It goes to the minibuffer and then it seems to be impossible to exit the minibuffer. I can find an emacs bug report #3274 and some discussion

Re: [PATCH 5/5] emacs: Retain the state of the buffer during `notmuch-show-refresh-view'.

2012-01-30 Thread Mark Walters
On Mon, 30 Jan 2012 16:31:04 +, David Edmondson d...@dme.org wrote: Record the state of the buffer during `notmuch-show-refresh-view'. In this context, state is defined as: - the open/closed state of each message, - the current message. This looks great! I have two very minor queries

Re: Bug?: notmuch-search-show-thread shows several threads; only one containing matching messages

2012-01-30 Thread Mark Walters
On Mon, 30 Jan 2012 20:04:25 +0100, Gregor Zattler telegr...@gmx.net wrote: Hi Pieter, * Pieter Praet pie...@praet.org [30. Jan. 2012]: On Mon, 30 Jan 2012 00:42:14 +0100, Gregor Zattler telegr...@gmx.net wrote: * Pieter Praet pie...@praet.org [26. Jan. 2012]: On Thu, 26 Jan 2012

Re: Bug?: notmuch-search-show-thread shows several threads; only one containing matching messages

2012-01-30 Thread Mark Walters
On Mon, 30 Jan 2012 23:34:16 +0100, Gregor Zattler telegr...@gmx.net wrote: Hi Mark, * Mark Walters markwalters1...@gmail.com [30. Jan. 2012]: On Mon, 30 Jan 2012 20:04:25 +0100, Gregor Zattler telegr...@gmx.net wrote: * Pieter Praet pie...@praet.org [30. Jan. 2012]: On Mon, 30 Jan 2012

Re: [PATCH 4/7] lib: Add the exclude flag to notmuch_query_search_threads

2012-01-31 Thread Mark Walters
On Mon, 30 Jan 2012 23:50:20 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 29 at 6:39 pm: Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to notmuch_query_search_threads. Implemented by inspecting the tags directly in _notmuch_thread_create/_thread_add_message rather

Re: [PATCH 5/7] cli: Make notmuch-show respect excludes.

2012-01-31 Thread Mark Walters
On Mon, 30 Jan 2012 23:56:24 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 29 at 6:39 pm: This adds the excludes to notmuch-show.c. We do not exclude when only a single message (or part) is requested. notmuch-show will output the exclude information when either

Re: [PATCH 3/5] emacs: Allow the indentation of content to be toggled.

2012-01-31 Thread Mark Walters
Hi I have reviewed the patch series within the limits of my lisp knowledge. Patch 1: is rather beyond my lisp so I won't comment on that (and I have never tried crypto): Patches 2-5 look fine with one bikeshed and one query for my own understanding. The bikeshed is that I agree with Jani in

Re: [PATCH 3/5] emacs: Allow the indentation of content to be toggled.

2012-01-31 Thread Mark Walters
On Tue, 31 Jan 2012 16:23:32 +, David Edmondson d...@dme.org wrote: On Tue, 31 Jan 2012 16:15:11 +, Mark Walters markwalters1...@gmail.com wrote: Hi I have reviewed the patch series within the limits of my lisp knowledge. Patch 1: is rather beyond my lisp so I won't comment

Re: [PATCH 3/7] lib: Make notmuch_query_search_messages set the exclude flag

2012-02-02 Thread Mark Walters
On Tue, 31 Jan 2012 11:25:06 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 31 at 11:45 am: On Mon, 30 Jan 2012 23:43:52 -0500, Austin Clements amdra...@mit.edu wrote: Quoth Mark Walters on Jan 29 at 6:39 pm: notmuch_message_node_t *iterator

[Patch V4] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag

2012-02-02 Thread Mark Walters
Here is the latest version of this patch set. I think I have fixed most of the problems raised in review but there are some remaining issues detailed below. Changes and queries: 1) Changed --do-not-exclude option to --no-exclude 2) The api notmuch_query_set_omit_excluded_messages remains:

[PATCH v4 01/11] cli: add --no-exclude option to count and search.

2012-02-02 Thread Mark Walters
This option turns off the exclusion so all matching messages are returned. We do not need to add this to notmuch-show as that does not (yet) exclude. --- notmuch-count.c | 17 +++-- notmuch-search.c | 17 +++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff

[PATCH v4 02/11] cli: Add --no-exclude to the man pages for search and count

2012-02-02 Thread Mark Walters
--- man/man1/notmuch-count.1 |7 +++ man/man1/notmuch-search.1 |7 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-count.1 b/man/man1/notmuch-count.1 index 25fe329..413b405 100644 --- a/man/man1/notmuch-count.1 +++ b/man/man1/notmuch-count.1

[PATCH v4 04/11] lib: Rearrange the exclude code in query.cc

2012-02-02 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 v4 06/11] lib: Add the exclude flag to notmuch_query_search_threads

2012-02-02 Thread Mark Walters
Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to notmuch_query_search_threads. Implemented by inspecting the tags directly in _notmuch_thread_create/_thread_add_message rather than as a Xapian query for speed reasons. --- lib/notmuch-private.h |7 +-- lib/query.cc |1 +

[PATCH v4 08/11] cli: Make notmuch-show respect excludes.

2012-02-02 Thread Mark Walters
This adds the excludes to notmuch-show.c. We do not exclude when only a single message (or part) is requested. notmuch-show will output the exclude information when either text or json format is requested. As this changes the output from notmuch-show it breaks many tests (in a trivial and expected

Re: [PATCH v4 07/11] lib: added interface notmuch_thread_get_flag_messages

2012-02-02 Thread Mark Walters
On Fri, 03 Feb 2012 01:07:59 +0200, Jani Nikula j...@nikula.org wrote: On Thu, 02 Feb 2012 22:27:36 +, Mark Walters markwalters1...@gmail.com wrote: On Thu, 02 Feb 2012 23:55:33 +0200, Jani Nikula j...@nikula.org wrote: Hi Mark - This is my first look at any version

Re: [PATCH 1/2] cli: convert notmuch show to use the new argument parser

2012-02-03 Thread Mark Walters
On Sat, 4 Feb 2012 00:41:08 +0200, Jani Nikula j...@nikula.org wrote: Use the new notmuch argument parser to handle arguments in notmuch show. There are two corner case functional changes: 1) Also set params.raw = 1 when defaulting to raw format when part is requested but format is not

Re: Bug: emacs 23.2 doesn't like ido-completing-read

2012-02-04 Thread Mark Walters
On Mon, 30 Jan 2012 10:21:38 +, Mark Walters markwalters1...@gmail.com wrote: On Mon, 30 Jan 2012 09:39:32 +, David Edmondson d...@dme.org wrote: On Sun, 29 Jan 2012 23:17:55 +, Mark Walters markwalters1...@gmail.com wrote: I have been experimenting with notmuch-always-prompt

[PATCH 1/2] cli: add --from option to reply to restrict guessing of the From: header.

2012-02-04 Thread Mark Walters
Add an option --from= to notmuch-reply.c to restrict guessing of the From: header. The existing logic looks as the main headers, then at the delivery headers, and finally defaults to the config file address. This patch allows the user to restrict which of these guesses are made. Currently the

[PATCH 2/2] emacs: Improve prompting for user address when replying.

2012-02-04 Thread Mark Walters
This patch uses the new --from option to notmuch reply to allow it to prompt the user for the From: address in cases when the cli does not know the correct from address. If the cli does not it either uses the users default address or, if notmuch-always-prompt-for-sender is set, prompts the user.

Re: [PATCH 1/2] cli: add --from option to reply to restrict guessing of the From: header.

2012-02-04 Thread Mark Walters
On Sat, 04 Feb 2012 19:59:58 +0200, Jani Nikula j...@nikula.org wrote: On Sat, 4 Feb 2012 17:09:09 +, Mark Walters markwalters1...@gmail.com wrote: Add an option --from= to notmuch-reply.c to restrict guessing of the From: header. The existing logic looks as the main headers

Re: [PATCH 2/2] emacs: Improve prompting for user address when replying.

2012-02-04 Thread Mark Walters
On Sat, 04 Feb 2012 20:03:13 +0200, Jani Nikula j...@nikula.org wrote: On Sat, 4 Feb 2012 17:09:10 +, Mark Walters markwalters1...@gmail.com wrote: This patch uses the new --from option to notmuch reply to allow it to prompt the user for the From: address in cases when the cli does

Re: Bug: emacs 23.2 doesn't like ido-completing-read

2012-02-04 Thread Mark Walters
On Sat, 04 Feb 2012 22:14:25 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: On Sat, 04 Feb 2012 12:31:57 +, Mark Walters markwalters1...@gmail.com wrote: I hadn't realised before but this also goes wrong if you use the prefix argument to mail (eg ctrl-u m). The current code seems

[Patch v2 0/4] Control selection of From: header when replying

2012-02-04 Thread Mark Walters
This is version 2 of the patch set first posted in id:1328375350-10352-1-git-send-email-markwalters1...@gmail.com This fixes the bug Jani pointed out as well as the more minor criticisms. It also has some tests and the man pages are updated. Best wishes Mark

[PATCH v2 1/4] cli: add --from option to reply to restrict guessing of the From: header.

2012-02-04 Thread Mark Walters
Add an option --from= to notmuch-reply.c to restrict guessing of the From: header. The existing logic looks as the main headers, then at the delivery headers, and finally defaults to the config file address. This patch allows the user to restrict which of these guesses are made. Currently the

[PATCH v2 2/4] cli: update man page for notmuch-reply --from:

2012-02-04 Thread Mark Walters
--- man/man1/notmuch-reply.1 | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1 index 5160ece..101ed47 100644 --- a/man/man1/notmuch-reply.1 +++ b/man/man1/notmuch-reply.1 @@ -62,6 +62,33 @@

[PATCH v2 3/4] emacs: Improve prompting for user address when replying.

2012-02-04 Thread Mark Walters
This patch uses the new --from option to notmuch reply to allow it to prompt the user for the From: address in cases when the cli does not know the correct from address. If the cli does not it either uses the users default address or, if notmuch-always-prompt-for-sender is set, prompts the user.

[PATCH v2 4/4] test: test the new --from option to notmuch-reply

2012-02-04 Thread Mark Walters
--- test/reply | 69 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/test/reply b/test/reply index 00f4bea..0bb22bb 100755 --- a/test/reply +++ b/test/reply @@ -138,4 +138,73 @@ References: ${gen_msg_id} On Tue, 05

  1   2   3   4   5   6   7   8   9   10   >