From 72d70ec60f1c1041787cc7afa6109103e045d111 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 23 Jun 2011 15:10:31 -0700 Subject: [PATCH 01/18] test: Test emacs message composing with various values for notmuch-fcc-dirs We exercise each of the documented values (nil, a string, and a list). For the list, we test matching a specific entry, matching a catch-all regular expression, and no match at all (in which case there is no FCC set). (cherry picked from commit 76b54f1898e97f6d07d0eaaf04a1772e60a7c48d) --- test/emacs | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/test/emacs b/test/emacs index fa3426ed..9b5d4854 100755 --- a/test/emacs +++ b/test/emacs @@ -108,6 +108,78 @@ notmuch new > /dev/null output=$(notmuch search 'subject:"testing message sent via SMTP"' | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)" +test_begin_subtest "notmuch-fcc-dirs set to nil" +test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make another FCC maildir specific for the next test +mkdir -p mail/sent-string/cur +mkdir -p mail/sent-string/new +mkdir -p mail/sent-string/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a string" +test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +test_emacs "(setq notmuch-fcc-dirs \"sent-string\") (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-string +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make more FCC maildirs specific for the next test +mkdir -p mail/sent-list-match/cur +mkdir -p mail/sent-list-match/new +mkdir -p mail/sent-list-match/tmp +mkdir -p mail/failure/cur +mkdir -p mail/failure/new +mkdir -p mail/failure/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a list (with match)" +test_emacs "(setq notmuch-fcc-dirs '((\"notmuchmail.org\" . \"sent-list-match\") (\".*\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-list-match +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make another FCC maildir specific for the next test +mkdir -p mail/sent-list-catch-all/cur +mkdir -p mail/sent-list-catch-all/new +mkdir -p mail/sent-list-catch-all/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a list (catch-all)" +test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\".*\" . \"sent-list-catch-all\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-list-catch-all +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "notmuch-fcc-dirs set to a list (no match)" +test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\"nomatchhere.net\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Reply within emacs" # We sed away everything before the ^From in the output to avoid getting # confused by messages such as "Parsing /home/cworth/.mailrc... done" From d012827890e6991d448ff3db7e92205cb2522b0d Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Sat, 28 May 2011 14:51:49 -0700 Subject: [PATCH 02/18] Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup' This error occurs when `notmuch-fcc-dirs' is set to a list. The error was in the `notmuch-fcc-dirs' format check which was changed in an incompatible way from 0.4 to 0.5. The fix was extracted from a bigger patch series by David Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org". Signed-off-by: Jameson Graef Rollins (cherry picked from commit ce08571428dc784e279b28527f8073a1a05d7c37) --- emacs/notmuch-maildir-fcc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index aede7537..b6c6e2a7 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -88,7 +88,7 @@ will NOT be removed or replaced." notmuch-fcc-dirs) ((and (listp notmuch-fcc-dirs) - (= 1 (length (car notmuch-fcc-dirs)))) + (stringp (car notmuch-fcc-dirs))) ;; Old style - no longer works. (error "Invalid `notmuch-fcc-dirs' setting (old style)")) From de1ed86b79a1428cd2f0cf7e3a80748367588e8b Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Fri, 24 Jun 2011 03:59:33 +0400 Subject: [PATCH 03/18] test: remove useless test_emacs call from an emacs FCC test This was inadvertently left over when debugging an early version of this commit. -Carl Worth (cherry picked from commit 8bf0c1c3deb49d54e86c04826a05f0217a81cf47) --- test/emacs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/emacs b/test/emacs index 9b5d4854..6f82b08e 100755 --- a/test/emacs +++ b/test/emacs @@ -124,7 +124,6 @@ mkdir -p mail/sent-string/new mkdir -p mail/sent-string/tmp test_begin_subtest "notmuch-fcc-dirs set to a string" -test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT test_emacs "(setq notmuch-fcc-dirs \"sent-string\") (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT cat <EXPECTED From: Notmuch Test Suite From 8d46f053043e2645da8a7c4d85d3cd321f9a5e3a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 26 Jun 2011 22:08:52 -0300 Subject: [PATCH 04/18] libnotmuch: build symbols list without relying on gcc -aux-info. Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. A small modification of the original sed regular expression allows us to work directly from lib/notmuch.h, rather than preprocessing with gcc. As with most such simple regex based "parsing", this is quite sensitive to the input format, and needs that each symbol to be exported from libnotmuch should - start with "notmuch_" - be the first non-whitespace token on the line - be followed by an open parenthesis. (Cherry-picked from 51b7ab69687, with conflicts resolved by db) --- lib/Makefile.local | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Makefile.local b/lib/Makefile.local index 4676504c..7e2bc87b 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -76,9 +76,8 @@ $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ notmuch.sym: lib/notmuch.h - gcc -aux-info notmuch.aux $< printf "{\nglobal:\n" > notmuch.sym - sed -n 's/.*\(notmuch_[a-z_]*\) (.*/\t\1;/p' notmuch.aux >> notmuch.sym + sed -n 's/^\s*\(notmuch_[a-z_]*\)\s*(.*/\t\1;/p' $< >> notmuch.sym printf "local: *;\n};\n" >> notmuch.sym $(dir)/$(SONAME): $(dir)/$(LIBNAME) @@ -103,4 +102,4 @@ install-$(dir): $(dir)/$(LIBNAME) $(LIBRARY_INSTALL_POST_COMMAND) SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a notmuch.aux notmuch.sym +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a notmuch.sym From fa0c0d0e668961aa9dce884ee7b325095b44ca47 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Fri, 24 Jun 2011 17:26:55 -0600 Subject: [PATCH 05/18] search --output=files: Output all filenames for each matching message Messages in the database can have multiple files associated with a single message-id, but until now only one filename for each message has been reported by "notmuch search --output=files" Signed-off-by: Mark Anderson (cherry picked from commit d752509abfd7697d2f8a1c5be6f96f0df4f0299d) --- notmuch-search.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index 616fe68a..faccaf7d 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -275,6 +275,7 @@ do_search_messages (const search_format_t *format, { notmuch_message_t *message; notmuch_messages_t *messages; + notmuch_filenames_t *filenames; int first_message = 1; messages = notmuch_query_search_messages (query); @@ -289,19 +290,33 @@ do_search_messages (const search_format_t *format, { message = notmuch_messages_get (messages); - if (! first_message) - fputs (format->item_sep, stdout); - if (output == OUTPUT_FILES) { - format->item_id (message, "", - notmuch_message_get_filename (message)); + filenames = notmuch_message_get_filenames (message); + + for (; + notmuch_filenames_valid (filenames); + notmuch_filenames_move_to_next (filenames)) + { + if (! first_message) + fputs (format->item_sep, stdout); + + format->item_id (message, "", + notmuch_filenames_get (filenames)); + + first_message = 0; + } + + notmuch_filenames_destroy( filenames ); + } else { /* output == OUTPUT_MESSAGES */ + if (! first_message) + fputs (format->item_sep, stdout); + format->item_id (message, "id:", notmuch_message_get_message_id (message)); + first_message = 0; } - first_message = 0; - notmuch_message_destroy (message); } From c04e6f84d3de7236891696b7c6cc009e7f5e976c Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Mon, 27 Jun 2011 11:12:24 -0600 Subject: [PATCH 06/18] test:Folder tags shouldn't match after removal of file in given folder Test for bug. Current stemming support for notmuch adds extra terms to the DB which aren't removed when the file renames are detected. When folder tags are added to a message, Xapian terms for both XFOLDER and ZXFOLDER are generated. When one of the filenames are renamed/removed, only the XFOLDER tags are removed, leaving it possible for a match on a folder: tag that was previously but is no longer a match in the maildir. (cherry picked from commit 86e0baeb6df5509393832488c0de3520a1a5bdcb) --- test/notmuch-test | 1 + test/search-folder-coherence | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 test/search-folder-coherence diff --git a/test/notmuch-test b/test/notmuch-test index fe85c6a4..79e6267b 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -41,6 +41,7 @@ TESTS=" maildir-sync crypto symbol-hiding + search-folder-coherence " TESTS=${NOTMUCH_TESTS:=$TESTS} diff --git a/test/search-folder-coherence b/test/search-folder-coherence new file mode 100755 index 00000000..cf3ba40d --- /dev/null +++ b/test/search-folder-coherence @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +test_description='folder tags removed and added through file renames remain consistent' +. ./test-lib.sh + +test_begin_subtest "No new messages" +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "No new mail." + + +test_begin_subtest "Single new message" +generate_message +file_x=$gen_msg_filename +id_x=$gen_msg_id +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "Added 1 new message to the database." + +test_begin_subtest "Add second folder for same message" +dir=$(dirname $file_x) +mkdir $dir/spam +cp $file_x $dir/spam +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "No new mail." + + +test_begin_subtest "Multiple files for same message" +cat <EXPECTED +MAIL_DIR/msg-001 +MAIL_DIR/spam/msg-001 +EOF +notmuch search --output=files id:$id_x | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Test matches folder:spam" +output=$(notmuch search folder:spam) +test_expect_equal "$output" "thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)" + +sleep 1; + +test_begin_subtest "Remove folder:spam copy of email" +rm $dir/spam/$(basename $file_x) +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "No new mail. Detected 1 file rename." + +test_begin_subtest "No mails match the folder:spam search" +output=$(notmuch search folder:spam) +test_expect_equal "$output" "" + +test_done From 671ffbb76600f7522db54151974cd0afdde240aa Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 29 Jun 2011 14:11:38 -0700 Subject: [PATCH 07/18] test: Use increment_mtime rather than sleep The sleep was to force the directory's mtime to advance between the previous notmuch new and the subsequent rm;notmuch new. The current convention is to use the existing increment_mtime function for this purpose, (which avoids the test suite being slowed down by calls to sleep). Thanks to Austin Clements for noticing this undesired sleep. (cherry picked from commit 55a78d5dbd96b80939458d9d6cc8a536b1befa87) --- test/search-folder-coherence | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/search-folder-coherence b/test/search-folder-coherence index cf3ba40d..9c312542 100755 --- a/test/search-folder-coherence +++ b/test/search-folder-coherence @@ -34,10 +34,9 @@ test_begin_subtest "Test matches folder:spam" output=$(notmuch search folder:spam) test_expect_equal "$output" "thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)" -sleep 1; - test_begin_subtest "Remove folder:spam copy of email" rm $dir/spam/$(basename $file_x) +increment_mtime $dir/spam output=$(NOTMUCH_NEW) test_expect_equal "$output" "No new mail. Detected 1 file rename." From d77c7cefe45d132bd38aa5bfd4dd2f7a624b090b Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Wed, 29 Jun 2011 14:04:45 -0600 Subject: [PATCH 08/18] Fix folder: coherence issue Add removal of all ZXFOLDER terms to removal of all XFOLDER terms for each message filename removal. The existing filename-list reindexing will put all the needed terms back in. Test search-folder-coherence now passes. Signed-off-by:Mark Anderson (cherry picked from commit 8a856e5c38b79359e4fbf9e27f58b1fe00c1e18a) --- lib/message.cc | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 4b59fa91..2a4954dd 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -514,6 +514,8 @@ _notmuch_message_remove_filename (notmuch_message_t *message, const char *folder_prefix = _find_prefix ("folder"); int folder_prefix_len = strlen (folder_prefix); void *local = talloc_new (message); + char *zfolder_prefix = talloc_asprintf(local, "Z%s", folder_prefix); + int zfolder_prefix_len = strlen (zfolder_prefix); char *direntry; notmuch_private_status_t private_status; notmuch_status_t status; @@ -530,9 +532,12 @@ _notmuch_message_remove_filename (notmuch_message_t *message, status = COERCE_STATUS (private_status, "Unexpected error from _notmuch_message_remove_term"); - /* Re-synchronize "folder:" terms for this message. This requires - * first removing all "folder:" terms, then adding back terms for - * all remaining filenames of the message. */ + /* Re-synchronize "folder:" terms for this message. This requires: + * 1. removing all "folder:" terms + * 2. removing all "folder:" stemmed terms + * 3. adding back terms for all remaining filenames of the message. */ + + /* 1. removing all "folder:" terms */ while (1) { i = message->doc.termlist_begin (); i.skip_to (folder_prefix); @@ -551,6 +556,26 @@ _notmuch_message_remove_filename (notmuch_message_t *message, } } + /* 2. removing all "folder:" stemmed terms */ + while (1) { + i = message->doc.termlist_begin (); + i.skip_to (zfolder_prefix); + + /* Terminate loop when no terms remain with desired prefix. */ + if (i == message->doc.termlist_end () || + strncmp ((*i).c_str (), zfolder_prefix, zfolder_prefix_len)) + { + break; + } + + try { + message->doc.remove_term ((*i)); + } catch (const Xapian::InvalidArgumentError) { + /* Ignore failure to remove non-existent term. */ + } + } + + /* 3. adding back terms for all remaining filenames of the message. */ i = message->doc.termlist_begin (); i.skip_to (direntry_prefix); From dd544f5dc6b9fd8b034db2d1bc266edc553097c2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 29 Jun 2011 14:08:04 -0700 Subject: [PATCH 09/18] debian/changelog: Add note that notmuch-vim description is in (bug #631974) This note will automatically cause the bug entry to be closed as fixed when the next package (including this change) is uploaded. (cherry picked from commit 04b9ffa56f54976f6a3324a3673915a036646ea6) --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index e8f5f150..75e93702 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ notmuch (0.6~264) UNRELEASED; urgency=low * New snapshot, in progress + * Fix description of notmuch-vim to mention vim, not emacs + (Closes: #631974) -- David Bremner Thu, 23 Jun 2011 19:39:05 -0300 From 76399e5f7340e2fefccbd294227976b06ae36e17 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Fri, 24 Jun 2011 08:44:06 +0200 Subject: [PATCH 10/18] python: Do not implicitely call maildir_flags_to_tags etc In order to remain consistent with the underlying C API, we do not automatically synchronize notmuch tags and maildir flags anymore. The underlying functions Message.maildir_flags_to_tags and Message.tags_to_maildir_flags still exist and are available to the user. Signed-off-by: Sebastian Spaeth (cherry picked from commit e59eaa5ddd2c23742c95e2acd34673b58ea34d2d) --- bindings/python/notmuch/database.py | 18 ++++++++++----- bindings/python/notmuch/message.py | 36 +++++++++++++++-------------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 926bac63..5deb2a5d 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -261,10 +261,10 @@ class Database(object): # return the Directory, init it with the absolute path return Directory(abs_dirpath, dir_p, self) - def add_message(self, filename): + def add_message(self, filename, sync_maildir_flags=False): """Adds a new message to the database - `filename` should be a path relative to the path of the open + :param filename: should be a path relative to the path of the open database (see :meth:`get_path`), or else should be an absolute filename with initial components that match the path of the database. @@ -274,8 +274,12 @@ class Database(object): notmuch database will reference the filename, and will not copy the entire contents of the file. - If the message contains Maildir flags, we will -depending on the - notmuch configuration- sync those tags to initial notmuch tags. + :param sync_maildir_flags: If the message contains Maildir + flags, we will -depending on the notmuch configuration- sync + those tags to initial notmuch tags, if set to `True`. It is + `False` by default to remain consistent with the libnotmuch + API. You might want to look into the underlying method + :meth:`Message.maildir_flags_to_tags`. :returns: On success, we return @@ -317,9 +321,11 @@ class Database(object): if not status in [STATUS.SUCCESS, STATUS.DUPLICATE_MESSAGE_ID]: raise NotmuchError(status) - #construct Message(), sync initial tags from Maildir flags and return + #construct Message() and return msg = Message(msg_p, self) - msg.maildir_flags_to_tags() + #automatic sync initial tags from Maildir flags + if sync_maildir_flags: + msg.maildir_flags_to_tags() return (msg, status) def remove_message(self, filename): diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index 68de5552..763d2c68 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -470,7 +470,7 @@ class Message(object): raise NotmuchError(STATUS.NULL_POINTER) return Tags(tags_p, self) - def add_tag(self, tag, sync_maildir_flags=True): + def add_tag(self, tag, sync_maildir_flags=False): """Adds a tag to the given message Adds a tag to the current message. The maximal tag length is defined in @@ -480,11 +480,11 @@ class Message(object): :param sync_maildir_flags: If notmuch configuration is set to do this, add maildir flags corresponding to notmuch tags. See - :meth:`tags_to_maildir_flags`. Use False if you want to - add/remove many tags on a message without having to - physically rename the file every time. Do note, that this - will do nothing when a message is frozen, as tag changes - will not be committed to the database yet. + underlying method :meth:`tags_to_maildir_flags`. Use False + if you want to add/remove many tags on a message without + having to physically rename the file every time. Do note, + that this will do nothing when a message is frozen, as tag + changes will not be committed to the database yet. :returns: STATUS.SUCCESS if the tag was successfully added. Raises an exception otherwise. @@ -514,7 +514,7 @@ class Message(object): self.tags_to_maildir_flags() return STATUS.SUCCESS - def remove_tag(self, tag, sync_maildir_flags=True): + def remove_tag(self, tag, sync_maildir_flags=False): """Removes a tag from the given message If the message has no such tag, this is a non-operation and @@ -523,11 +523,11 @@ class Message(object): :param tag: String with a 'tag' to be removed. :param sync_maildir_flags: If notmuch configuration is set to do this, add maildir flags corresponding to notmuch tags. See - :meth:`tags_to_maildir_flags`. Use False if you want to - add/remove many tags on a message without having to - physically rename the file every time. Do note, that this - will do nothing when a message is frozen, as tag changes - will not be committed to the database yet. + underlying method :meth:`tags_to_maildir_flags`. Use False + if you want to add/remove many tags on a message without + having to physically rename the file every time. Do note, + that this will do nothing when a message is frozen, as tag + changes will not be committed to the database yet. :returns: STATUS.SUCCESS if the tag was successfully removed or if the message had no such tag. @@ -559,12 +559,13 @@ class Message(object): - def remove_all_tags(self, sync_maildir_flags=True): + def remove_all_tags(self, sync_maildir_flags=False): """Removes all tags from the given message. See :meth:`freeze` for an example showing how to safely replace tag values. + :param sync_maildir_flags: If notmuch configuration is set to do this, add maildir flags corresponding to notmuch tags. See :meth:`tags_to_maildir_flags`. Use False if you want to @@ -703,8 +704,9 @@ class Message(object): Also, if this filename is in a directory named "new", rename it to be within the neighboring directory named "cur". - Usually, you do not need to call this manually as - tag changing methods should be implicitly calling it. + Do note that calling this method while a message is frozen might + not work yet, as the modified tags have not been committed yet + to the database. :returns: a :class:`STATUS`. In short, you want to see notmuch.STATUS.SUCCESS here. See there for details.""" @@ -730,8 +732,8 @@ class Message(object): is, the flags from the multiple filenames are combined with the logical OR operator.) - Usually, you do not need to call this manually as - :meth:`Database.add_message` implicitly calls it. + As a convenience, you can set the sync_maildir_flags parameter in + :meth:`Database.add_message` to implicitly call this. :returns: a :class:`STATUS`. In short, you want to see notmuch.STATUS.SUCCESS here. See there for details.""" From 3f777b2ac2075595c60842da0b7057a36629dc74 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 30 Jun 2011 08:29:07 -0300 Subject: [PATCH 11/18] debian: don't install zsh completion files into /usr/share/zsh as of version 4.3.12, perhaps earlier, the Debian zsh package now ships /usr/share/zsh/functions/Completion/Unix/_notmuch, so we shouldn't install that ourselves anymore. My understanding is that letting zsh ship the completion scripts is the standard thing to do. The script is still shipped in /usr/share/doc/notmuch/examples (cherry picked from commit 0a0f5f1bbe4bf256a14dee0ab2af3065a251a72c) --- debian/changelog | 4 +++- debian/notmuch.examples | 1 + debian/notmuch.install | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 debian/notmuch.examples diff --git a/debian/changelog b/debian/changelog index 75e93702..1641fb57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ notmuch (0.6~264) UNRELEASED; urgency=low * New snapshot, in progress * Fix description of notmuch-vim to mention vim, not emacs (Closes: #631974) + * Install zsh completion as an example instead of into /usr/share/zsh to + avoid file conflict with zsh. - -- David Bremner Thu, 23 Jun 2011 19:39:05 -0300 + -- David Bremner Thu, 30 Jun 2011 08:44:27 -0300 notmuch (0.6~254) experimental; urgency=low diff --git a/debian/notmuch.examples b/debian/notmuch.examples new file mode 100644 index 00000000..524e0f4b --- /dev/null +++ b/debian/notmuch.examples @@ -0,0 +1 @@ +completion/notmuch-completion.zsh diff --git a/debian/notmuch.install b/debian/notmuch.install index 5b7de1be..fff498d2 100644 --- a/debian/notmuch.install +++ b/debian/notmuch.install @@ -1,4 +1,3 @@ usr/bin usr/share/man/man1 etc/bash_completion.d -usr/share/zsh From 5d5322600584d2c66108f7b50d83f9f9087ff0e3 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 30 Jun 2011 10:04:57 -0300 Subject: [PATCH 12/18] debian: changelog stanza for first "official" release candidate The last upload to experimental was really a release candidate too. Switch versioning to ~rc1 as counting commits is confusing when building from the release branch. (cherry picked from commit 117852a5f1269e77a7f76c53236220a9ec89eba6) --- debian/changelog | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1641fb57..bfb1d60c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,13 @@ -notmuch (0.6~264) UNRELEASED; urgency=low +notmuch (0.6~rc1) experimental; urgency=low - * New snapshot, in progress + * Git snapshot 3f777b2 + * Upstream release candidate. * Fix description of notmuch-vim to mention vim, not emacs (Closes: #631974) * Install zsh completion as an example instead of into /usr/share/zsh to avoid file conflict with zsh. - -- David Bremner Thu, 30 Jun 2011 08:44:27 -0300 + -- David Bremner Thu, 30 Jun 2011 10:02:05 -0300 notmuch (0.6~254) experimental; urgency=low From 8f9c403131b6b7289986c9ef30b8780599bcea98 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 1 Jul 2011 01:44:39 -0700 Subject: [PATCH 13/18] emacs: Fix to unconditionally display subject changes in collapsed thread view The feature to show subject changes in the collapsed thread view was originally added (8ab433607) with an option (notmuch-show-always-show-subject) to display the subject for all messages, even when there was no change. The subsequent commit (4f04d273) changed the sense of the test (or to and) and the name of the controlling variable (notmuch-show-elide-same-subject). But this commit is broken in a few ways: 1. The original definition of notmuch-show-always-show-subject was left around But the variable isn't actually used in the code at all, so it just adds clutter and confusion to the customization interface. 2. The name and description of the controlling variable doesn't match the implementation The name suggests that setting the variable to t will cause repeated subjects to be elided, (suggesting that when it is nil all subjects will be shown). However, when the variable is nil, no subjects are shown. So a correct name for the variable in this sense would be notmuch-show-subject-changes. Showing subject changes is a useful feature, and should be on by default. (We don't want to bury generally useful features behind customizations that users have to find). Rather than fixing the name of the variable and changing its default value, here we remove the condition entirely, such that the feature is enabled unconditionally. So both the currently-used variable and the stale definition of the formerly-used are removed. Also, the one relevant test-suite result is updated, (showing the intial subject of a collapsed thread, and no subject display for later messages that do not change the subject). (cherry picked from commit 580de27177de5cd6c5cbc9cc3759ce320216dd5b) --- emacs/notmuch-show.el | 16 ++-------------- .../notmuch-show-thread-with-hidden-messages | 1 + 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index af1d44b6..45298783 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -65,17 +65,6 @@ any given message." :group 'notmuch :type 'boolean) -(defcustom notmuch-show-elide-same-subject nil - "Do not show the subject of a collapsed message if it is the -same as that of the previous message." - :group 'notmuch - :type 'boolean) - -(defcustom notmuch-show-always-show-subject t - "Should a collapsed message show the `Subject:' line?" - :group 'notmuch - :type 'boolean) - (defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers) "A list of functions called to decorate the headers listed in `notmuch-message-headers'.") @@ -727,9 +716,8 @@ current buffer, if possible." ;; If the subject of this message is the same as that of the ;; previous message, don't display it when this message is ;; collapsed. - (when (and notmuch-show-elide-same-subject - (not (string= notmuch-show-previous-subject - bare-subject))) + (when (not (string= notmuch-show-previous-subject + bare-subject)) (forward-line 1)) (setq headers-start (point-marker))) (setq headers-end (point-marker)) diff --git a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages index 5df66063..8a0660fa 100644 --- a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages +++ b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages @@ -1,3 +1,4 @@ Jan Janak (2009-11-17) (inbox unread) +Subject: [notmuch] What a great idea! Jan Janak (2009-11-17) (inbox) Carl Worth (2009-11-18) (inbox unread) From 9485ab508473bc3d89385a29a72b18f0cd191f1a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 1 Jul 2011 03:14:03 -0700 Subject: [PATCH 14/18] NEWS: Add notes for (imminent) notmuch 0.6 release By skimming through "git log 0.5..origin/release" late at night. Hopefully everything here is accurate. (cherry picked from commit d173069ad9cf042458f16af00729867cb13bb3b7) --- NEWS | 344 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 344 insertions(+) diff --git a/NEWS b/NEWS index 5a1778e6..aae4adde 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,347 @@ +Notmuch 0.6 (2011-07-XX) +======================= +New, general features +--------------------- +Folder-based searching + + Notmuch queries can now include a search term to match the + directories in which mail files are stored (within the mail + storage). The syntax is as follows: + + folder: + + For example, one might use things such as: + + folder:spam + folder:2011/06 + + or anything else that matches directories within your mail storage. + + This feature is particularly useful for users of delivery-agent + software (such as procmail or maildrop) that is filtering mail and + delivering it to particular folders, or users of systems such as + Gmail that use filesystem directories to indicate message tags. + + NOTE: Only messages that are newly indexed with this version of + notmuch will be searchable with folder: terms. In order to enable + this feature for all mail, the entire notmuch index will need to be + rebuilt as follows: + + notmuch dump > notmuch.dump + # Backup, then remove notmuch database ($MAIL/.notmuch) + notmuch new + notmuch restore notmuch.dump + +New, automatic tags: "signed" and "encrypted" + + These tags will automatically be applied to messages containing + multipart/signed and multipart/encrypted parts. + + NOTE: Only messages that are newly indexed with this version of + notmuch will receive these tags. In order to enable this feature for + all mail, the entire notmuch index will need to be rebuilt (see + above). + +New command-line features +------------------------- +Add new "notmuch show --verify" option for signature verification + + This option instruct notmuch to verify the signature of + PGP/MIME-signed parts. + +Add new "notmuch show --decrypt" and "notmuch reply --decrypt" options + + This option instructs notmuch to decrypt PGP/MIME-encrypted parts. + +Proper nesting of multipart parts in "notmuch show" output + + MIME parts are now display with proper nesting to reflect original + MIME hierarchy of a message. This allows clients to correctly + analyze the MIME structure, (such as, for example, determining to + which parts a signature part applies). + +Add new "notmuch show --part" option + + This is a replacement for the older "notmuch part" command, (which + is now deprecated—it should still work as always, but is no longer + documented). Putting part output under "notmuch show" allows for all + of the "notmuch show" options to be applied when extracting a single + part, (such as --format=json for extracting a message part with JSON + formatting). + +Deprecate "notmuch search-tags", (in favor of "notmuch search --output=tags *") + + The "notmuch search-tags" sub-command has been redundant since the + addition of the --output=tags option to "notmuch search". We now + make that more clear by deprecating "notmuch search-tags", (dropping + it from the documentation). We do continue to support the old syntax + by translating it internally to the new call. + +Performance improvements +------------------------ +Faster searches (by doing fewer serches to construct threads) + + Whenever a user asks for search results as threads, notmuch first + performs a search for messages matching the query, then performs + additional searches to find other messages in the resulting threads. + + Removing inefficiences and redundancies in these secondary searches + results in a measured speedups of 1.5x for a typical search. + +Faster searches (by doing fewer passes to gather message data) + + Optimizing Xapian data access patterns (using a single pass to get + all message-document data rather than a ps for each data type) + results in a measured speedup of 1.7x for a typical search. + + The benefits of this optimization combine with the preceding + optimization. With both in place, Austin Clements measured a speedup + of 2.5x for a search of all messages in his inbox (was 4.5s, now + 1.8s). Thanks, Austin! + +Faster initial indexing + + More efficient indexing of new messages results in a measured + speedup of 1.4x for the initial indexing of 3 GB of mail (1h 14m + rather than 1h 46m). Thanks to Austin Clements and Michal Sojka. + +Make "notmuch new" faster for unchanged directories + + Optimizing to not do any further examinations of sub-directories + when the filesystem indicates that a directory is unchanged from the + last "notmuch new" results in measured speedups of 8.5 for the "No + new mail" case, (was 0.77s, now 0.09s). Thanks to Austin Clements + and Karel Zak. + +New emacs-interface features +---------------------------- +Output of pipe command is now displayed if pipe command fails + + This is extremely useful in the common use case of piping a patch to + "git am". If git fails to cleanly merge the patch the error messages + from the failed merge are now clearly displayed to the user, (where + previously they were silently hidden from the user). + +User-selectable From address + + A user can choose which configured email addresses should be used as + the From address whenever composing a new message. To do so, simply + press C-u before the command which will open a new message. Emacs + will prompt for the from address to use. + + The user can customize the "Notmuch Identities" setting in the + notmuch cutomize group in order to use addresses other than those in + the notmuch configuration file if desired. + + The user can also choose to always be prompted for the from address + when composing a new message (without having to use C-u) by setting + the "Notmuch Always Prompt For Sender" option in the notmuch + customize group. + +Automatic detection and hiding of original message in top-posted message + + When a message contains a line looking something like: + + ----- Original Message ----- + + emacs hides this and all subsequent lines as an "original message", + (allowing the user to click or press enter on the "original message" + button to display it again). This makes the handling of top-posted + citations work much like conventional citations. + +New hooks for running code when tags are modified + + Some users want to perform additional actions whenever a particular + tag is added/removed from a message. This could be used to, for + example, interface with some external spam-recognition training + tool. T facilitate this, two new hooks are added which can be + modified in the following settings of the notmuch customize group: + + Notmuch Before Tag Hook + Notmuch After Tag Hook + +New optional support for hiding some multipart/alternative parts + + Many emails are sent with redundant content within a + multipart/alternative group (such as a text/plain part as well as a + text/html part). Users can configure the setting: + + Notmuch Show All Multipart/Alternative Parts + + to "off" in the notmuch customize group to have the interface + automatically hide some part alternatives (such as text/html + parts). This new part hiding is not configured by default yet + because there's not yet a simple way to re-display such a hidden + part if it is not actually redundant with a displayed part. + +Better rendering of text/x-vcalendar parts + + These parts are now displayed in a format suitable for use with the + emacs diary. + +Avoid getting confused by Subject and Author fields with newline characters + + Replacing all characters with ACII code less than 32 with a question mark. + +Cleaner display of From line in email messages (remove double quotes, +and drop "name" if it's actually just a repeat of the email address). + +Vim interface improvements +-------------------------- +Felipe Contreras provided a number of updates for the vim interface. + + Using sendmail directly rather than mailx, + + Implementing archive in show view + + Add support to mark as read in show and search views + + Add delete commands + + Various cleanups. + +Bindings improvements +--------------------- +Ruby bindings are now much more complete + + Including QUERY.sort, QUERY.to_s, MESSAGE.maildir_flags_to_tags, + MESSAGE.tags_to_maildir_flags, and MESSAGE.get_filenames + +Python bindings are now much more complete + + Including Message().get_filenames(), + Message().tags_to_maildir_flags(), Threads().__nonzero__, + Tags().__nonzero__() + + Also implement Message.__cmp__ and __hash__ + These allow, for example: + + if msg1 == msg2 + + As well as set arithmetic on Messages(): + + s1, s2= msgs1, msgs2 + s1.union(s2) + s2 -= s1 + +Added initial Go bindings in bindings/go + +New build-system features +------------------------- +Added support for building in a directory other than the source directory + + This can be used with the widely-supported idiom of simply running + the configure script from some other directory: + + mkdir build + cd build + ../configure + make + +Fix to save configure options for future, implicit runs of configure + + When a user updates the source (such as with "git pull") calling + "make" may cause an automatic re-run of the configure script. When + this happens, the configure script will automatically be called with + the same options the user originally passed in the most-recent + manual invocation of configure. + +New test-suite feature +---------------------- +Binary for bash for running test suite now located via PATH. + + The notmuch test suite requires a fairly recent version of bash (>= + bash 4). As some systems supply an older version of bash at + /bin/bash, the test suite is now updated to search $PATH to locate + the bash binary. This allows users of systems with old /bin/bash to + simply install bash >= 4 somwhere on $PATH before /bin and then use + the test suite. + +Support for testing output with a trailing newline. + + Previously, some tests would fail to notice a difference in the + presense/absence of a trailing newline in a program output, (which + has led to bugs in the past). Now, carefully-written tests (using + test_expect_equal_file rather than test_expect_equal) will detect + any change in the presence/absence of a trailing newline. Many tests + are updated to take advnatage of this. + +Avoiding accessing user's $HOME while running test suite + + The test suite now carefully creates its own HOME directory. This + allows the test suite to be run with no existing HOME directory, (as + some build systems apparently do), and avoids test-suite differences + due to configuration files in the users HOME directory. + + +General bug fixes +----------------- +Output *all* files for "notmuch search --output=files" + + For the cases where multiple files have the same Message ID, + previous versions of notmuch would output only one such file. This + command is now fixed to correctly output all files. + +Fixed spurious search results from "overlapped" indexing of addresses + + This fixed a bug where a search for: + + to:user@elsewhere.com + + would incorrectly match a message sent: + + To: user@example,com, someone@elsewhere.com + +Fix --output=json when search has no results + + A bug present since notmuch 0.4 had caused searches with no results + to produce an invalid json object. This is now fixed to cleanly + return a valid json object representing an empty array "[]" as + expected. + +fix the automatic detection of the From address for "notmuch reply" +from the Received headers in some cases. + +Fix core dump on DragonFlyBSD due to -1 return value from +sysconf(_SC_GETPW_R_SIZE_MAX). + +Cleaned up several memory leaks + +Eliminated a few, rare segmentation faults and a double-free. + +Fix libnotmuch library to only export notmuch API functions + + Previous release of the notmuch library also exported some Xapian + C++ exception type symbols. These were never part of the library + interface and were never intented to be exported. + +Emacs-interface bug fixes +------------------------- +Display any unexpected output or errors from "notmuch search" invocations + + Previously any misformatted output or trailing error messages were + silently ignored. This output is now clearly displayed. This fix was + very helpful in identifying and fixing the bug decribed below. + +Fix bug where some threads would be missing from large search results + + When a search returned a "large" number of results, the emacs + interface was incorrectly dropping one thread everytime the output + of the "notmuch search" process spanned the emacss read-buffer. This + is now fixed. + +Avoid rec-compression of .gz files (and similar) when saving attachment + + Emacs was being too clever for its own good and trying to + re-compress pre-compressed .gz files when saving such attachments + (potentially corrupting the attachment). The emacs interface is + fixed to avoid this bug. + +Fix hiding of a message when a previously-hidden citation is visible + + Previously the citation would remain visible in this case. This is + fixed so that hiding a message hides all parts. + Notmuch 0.5 (2010-11-11) ======================== New, general features From 65bf14d59ebedc71d0012b15f6a3e2d3f290ae68 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 30 Jun 2011 11:38:28 -0300 Subject: [PATCH 15/18] debian: move vim directory creation to notmuch-vim binary package This step was missed during the package split of notmuch to notmuch, notmuch-emacs, and notmuch-vim. It seems mostly harmless in this case, but it is silly for non-vim users to have those directories. (cherry picked from commit 4b5875d81ef80dd7138e178f59ac67f66d5fe0ab) --- debian/notmuch-vim.dirs | 3 +++ debian/notmuch.dirs | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 debian/notmuch-vim.dirs diff --git a/debian/notmuch-vim.dirs b/debian/notmuch-vim.dirs new file mode 100644 index 00000000..c978ac11 --- /dev/null +++ b/debian/notmuch-vim.dirs @@ -0,0 +1,3 @@ +usr/share/vim/registry +usr/share/vim/addons/plugin +usr/share/vim/addons/syntax diff --git a/debian/notmuch.dirs b/debian/notmuch.dirs index 4b4ce9ea..a23e43d9 100644 --- a/debian/notmuch.dirs +++ b/debian/notmuch.dirs @@ -1,5 +1,2 @@ usr/bin -usr/share/vim/registry -usr/share/vim/addons/plugin -usr/share/vim/addons/syntax etc/bash_completion.d From 8c5129bb510b9f4f7acc9752cc61a457eceb6f01 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 1 Jul 2011 11:48:01 -0300 Subject: [PATCH 16/18] debian: add changelog stanza for release 0.6, install upstream docs referred to. This perhaps breaks the "one thing at a time rule", but seems better than leaving the changelog pointing to nothing. --- debian/README.notmuch-emacs | 8 ++++++++ debian/README.notmuch-vim | 4 +++- debian/changelog | 10 ++++++++++ debian/notmuch.docs | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 debian/README.notmuch-emacs create mode 100644 debian/notmuch.docs diff --git a/debian/README.notmuch-emacs b/debian/README.notmuch-emacs new file mode 100644 index 00000000..713523b4 --- /dev/null +++ b/debian/README.notmuch-emacs @@ -0,0 +1,8 @@ + +* This package currently works only with emacs 23. Users of + pre-release snapshots of emacs 24 can expect problems. + +* For help in getting started with notmuch and the emacs interface, + see /usr/share/doc/notmuch/README. + + -- David Bremner , Fri, 1 Jul 2011 11:41:26 -0300 diff --git a/debian/README.notmuch-vim b/debian/README.notmuch-vim index f07b4991..ec052eef 100644 --- a/debian/README.notmuch-vim +++ b/debian/README.notmuch-vim @@ -3,4 +3,6 @@ notmuch for Debian To use the vim plugin, please install it using vim-addons(1) - -- martin f. krafft Thu, 21 Jan 2010 14:50:19 +1300 +See also /usr/share/doc/notmuch/README. + + -- David Bremner , Fri, 1 Jul 2011 11:34:39 -0300 diff --git a/debian/changelog b/debian/changelog index bfb1d60c..0fad868a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +notmuch (0.6) unstable; urgency=low + + * New upstream release; see /usr/share/doc/notmuch/NEWS for + details. Hilights include: + - Folder-based search (Closes: #597222) + - PGP/MIME decryption and verification + * Document strict dependency on emacs23 (Closes: #631994). + + -- David Bremner Fri, 01 Jul 2011 11:45:22 -0300 + notmuch (0.6~rc1) experimental; urgency=low * Git snapshot 3f777b2 diff --git a/debian/notmuch.docs b/debian/notmuch.docs new file mode 100644 index 00000000..50bd824b --- /dev/null +++ b/debian/notmuch.docs @@ -0,0 +1,2 @@ +NEWS +README From 74d00bb0e847a1aa785b9cae2e8242a7789bf8b3 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 1 Jul 2011 13:59:15 -0300 Subject: [PATCH 17/18] NEWS: Update for release 0.6 Fix some typos, add some notes on python bindings, "improve" the folder searching description, expand the discussion of crypto changes. This includes the changes from id:"1309541202-4938-1-git-send-email-dmitry.kurochkin@gmail.com" Thanks to Sebastian, Austin, and Uwe, Dmitry for the editing help. --- NEWS | 115 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 45 deletions(-) diff --git a/NEWS b/NEWS index aae4adde..f3fefad1 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Notmuch 0.6 (2011-07-XX) +Notmuch 0.6 (2011-07-01) ======================= New, general features --------------------- @@ -13,9 +13,11 @@ Folder-based searching For example, one might use things such as: folder:spam - folder:2011/06 + folder:2011-* + folder:work/todo - or anything else that matches directories within your mail storage. + to match any path containing a directory "spam", "work/todo", or + containing a directory starting with "2011-", respectively. This feature is particularly useful for users of delivery-agent software (such as procmail or maildrop) that is filtering mail and @@ -32,15 +34,19 @@ Folder-based searching notmuch new notmuch restore notmuch.dump +Support for PGP/MIME + + Both the command line interface and the emacs-interface have new + support for PGP/MIME, detailed below. Thanks to Daniel Kahn Gillmor + and Jameson Graef Rollins for making this happen. + New, automatic tags: "signed" and "encrypted" These tags will automatically be applied to messages containing multipart/signed and multipart/encrypted parts. NOTE: Only messages that are newly indexed with this version of - notmuch will receive these tags. In order to enable this feature for - all mail, the entire notmuch index will need to be rebuilt (see - above). + notmuch will receive these tags. New command-line features ------------------------- @@ -52,6 +58,8 @@ Add new "notmuch show --verify" option for signature verification Add new "notmuch show --decrypt" and "notmuch reply --decrypt" options This option instructs notmuch to decrypt PGP/MIME-encrypted parts. + Note that this feature currently requires gpg-agent and a passphrase entry + tool (e.g. pinentry-gtk or pinentry-curses). Proper nesting of multipart parts in "notmuch show" output @@ -79,19 +87,19 @@ Deprecate "notmuch search-tags", (in favor of "notmuch search --output=tags *") Performance improvements ------------------------ -Faster searches (by doing fewer serches to construct threads) +Faster searches (by doing fewer searches to construct threads) Whenever a user asks for search results as threads, notmuch first performs a search for messages matching the query, then performs additional searches to find other messages in the resulting threads. - Removing inefficiences and redundancies in these secondary searches + Removing inefficiencies and redundancies in these secondary searches results in a measured speedups of 1.5x for a typical search. Faster searches (by doing fewer passes to gather message data) Optimizing Xapian data access patterns (using a single pass to get - all message-document data rather than a ps for each data type) + all message-document data rather than a pass for each data type) results in a measured speedup of 1.7x for a typical search. The benefits of this optimization combine with the preceding @@ -110,11 +118,20 @@ Make "notmuch new" faster for unchanged directories Optimizing to not do any further examinations of sub-directories when the filesystem indicates that a directory is unchanged from the last "notmuch new" results in measured speedups of 8.5 for the "No - new mail" case, (was 0.77s, now 0.09s). Thanks to Austin Clements - and Karel Zak. + new mail" case, (was 0.77s, now 0.09s). Thanks to Karel Zak. New emacs-interface features ---------------------------- + +Support for PGP/MIME (GnuPG) + + Automatically indicate validity of signatures for multipart/signed + messages. Automatically display decrypted content for + multipart/encrypted messages. See the emacs variable + notmuch-crypto-process-mime for more information. Note that this + needs gpg-agent and a pinentry tool just as the command line tools. + Also note there is no support SMIME yet. + Output of pipe command is now displayed if pipe command fails This is extremely useful in the common use case of piping a patch to @@ -130,7 +147,7 @@ User-selectable From address will prompt for the from address to use. The user can customize the "Notmuch Identities" setting in the - notmuch cutomize group in order to use addresses other than those in + notmuch customize group in order to use addresses other than those in the notmuch configuration file if desired. The user can also choose to always be prompted for the from address @@ -138,6 +155,11 @@ User-selectable From address the "Notmuch Always Prompt For Sender" option in the notmuch customize group. +Hiding of repeated subjects in collapsed thread view + + In notmuch-show mode, if a collapsed message has the same subject as + its parent, the subject is not shown. + Automatic detection and hiding of original message in top-posted message When a message contains a line looking something like: @@ -154,7 +176,7 @@ New hooks for running code when tags are modified Some users want to perform additional actions whenever a particular tag is added/removed from a message. This could be used to, for example, interface with some external spam-recognition training - tool. T facilitate this, two new hooks are added which can be + tool. To facilitate this, two new hooks are added which can be modified in the following settings of the notmuch customize group: Notmuch Before Tag Hook @@ -181,24 +203,20 @@ Better rendering of text/x-vcalendar parts Avoid getting confused by Subject and Author fields with newline characters - Replacing all characters with ACII code less than 32 with a question mark. + Replacing all characters with ASCII code less than 32 with a question mark. Cleaner display of From line in email messages (remove double quotes, and drop "name" if it's actually just a repeat of the email address). Vim interface improvements -------------------------- -Felipe Contreras provided a number of updates for the vim interface. +Felipe Contreras provided a number of updates for the vim interface: - Using sendmail directly rather than mailx, - - Implementing archive in show view - - Add support to mark as read in show and search views - - Add delete commands - - Various cleanups. + * Using sendmail directly rather than mailx, + * Implementing archive in show view + * Add support to mark as read in show and search views + * Add delete commands + * Various cleanups. Bindings improvements --------------------- @@ -207,23 +225,29 @@ Ruby bindings are now much more complete Including QUERY.sort, QUERY.to_s, MESSAGE.maildir_flags_to_tags, MESSAGE.tags_to_maildir_flags, and MESSAGE.get_filenames -Python bindings are now much more complete +* Python bindings have been upodated and extended + (docs online at http://packages.python.org/notmuch/) - Including Message().get_filenames(), - Message().tags_to_maildir_flags(), Threads().__nonzero__, - Tags().__nonzero__() + New bindings: + - Message().get_filenames(), + - Message().tags_to_maildir_flags(),Message().maildir_flags_to_tags() + - list(Threads()) and list(Messages) works now - Also implement Message.__cmp__ and __hash__ + - Message().__cmp__() and __hash__() These allow, for example: - - if msg1 == msg2 + if msg1 == msg2: ... As well as set arithmetic on Messages(): - s1, s2= msgs1, msgs2 + s1, s2= set(msgs1), set(msgs2) s1.union(s2) s2 -= s1 + Removed: + - len(Messages()) as it exausted the iterator. + Use len(list(Messages())) or + Query.count_messages() to get the length. + Added initial Go bindings in bindings/go New build-system features @@ -254,17 +278,17 @@ Binary for bash for running test suite now located via PATH. bash 4). As some systems supply an older version of bash at /bin/bash, the test suite is now updated to search $PATH to locate the bash binary. This allows users of systems with old /bin/bash to - simply install bash >= 4 somwhere on $PATH before /bin and then use + simply install bash >= 4 somewhere on $PATH before /bin and then use the test suite. Support for testing output with a trailing newline. Previously, some tests would fail to notice a difference in the - presense/absence of a trailing newline in a program output, (which + presence/absence of a trailing newline in a program output, (which has led to bugs in the past). Now, carefully-written tests (using test_expect_equal_file rather than test_expect_equal) will detect any change in the presence/absence of a trailing newline. Many tests - are updated to take advnatage of this. + are updated to take advantage of this. Avoiding accessing user's $HOME while running test suite @@ -313,7 +337,7 @@ Fix libnotmuch library to only export notmuch API functions Previous release of the notmuch library also exported some Xapian C++ exception type symbols. These were never part of the library - interface and were never intented to be exported. + interface and were never intended to be exported. Emacs-interface bug fixes ------------------------- @@ -321,16 +345,16 @@ Display any unexpected output or errors from "notmuch search" invocations Previously any misformatted output or trailing error messages were silently ignored. This output is now clearly displayed. This fix was - very helpful in identifying and fixing the bug decribed below. + very helpful in identifying and fixing the bug described below. Fix bug where some threads would be missing from large search results When a search returned a "large" number of results, the emacs - interface was incorrectly dropping one thread everytime the output - of the "notmuch search" process spanned the emacss read-buffer. This + interface was incorrectly dropping one thread every time the output + of the "notmuch search" process spanned the emacs read-buffer. This is now fixed. -Avoid rec-compression of .gz files (and similar) when saving attachment +Avoid re-compression of .gz files (and similar) when saving attachment Emacs was being too clever for its own good and trying to re-compress pre-compressed .gz files when saving such attachments @@ -456,15 +480,15 @@ Allow for notmuch-fcc-dirs to have a value of nil. string. Instead it's now a list of cons cells where the car of each cell is a regular expression to be matched against the sender address, and the cdr is the name of a folder to use for an FCC. So - the old fallback behavior can be achieved by including a fineal cell + the old fallback behavior can be achieved by including a final cell of (".*" . "default-fcc-folder"). Vim interface improvements -------------------------- Felipe Contreras provided a number of updates for the vim interface. - These include optimiations, support for newer versions of vim, fixed - support for sending mail on modern systmms, new commands, and + These include optimizations, support for newer versions of vim, fixed + support for sending mail on modern systems, new commands, and various cleanups. New bindings @@ -950,7 +974,7 @@ Fix to compile against GMime 2.6 Fix configure script to accept (and ignore) various standard options. - For example, those that the gentoo build scripts expect configure to + For example, those that the Gentoo build scripts expect configure to accept are now all accepted. Test suite @@ -1058,7 +1082,7 @@ tags by region. Selective bulk tagging is now possible by selecting a region of threads and then using either the '+' or '-' keybindings. Bulk tagging is still available for all threads matching the current - search with th '*' binding. + search with the '*' binding. More meaningful buffer names for thread-view buffers. @@ -1112,3 +1136,4 @@ a performance bug that made notmuch very slow when modifying tags. This would cause distracting pauses when reading mail while notmuch would wait for Xapian when removing the "inbox" and "unread" tags from messages in a thread. + From 6bd02fb4dbee9e0fc372661af573a2ac380fed8a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 1 Jul 2011 15:12:23 -0300 Subject: [PATCH 18/18] version: bump to 0.6 The release machinery in the build system depends on this file being correct. --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 2eb3c4fe..5a2a5806 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.5 +0.6