From: David Bremner Date: Sat, 4 Feb 2012 17:01:46 +0000 (-0500) Subject: Merge commit '0.11.1' X-Git-Tag: debian/0.12_rc1-1~120 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=d43f6c00b351424e903c2f2b71c34bc5902b467e;hp=-c;p=obsolete%2Fnotmuch-old Merge commit '0.11.1' Conflicts: NEWS bindings/python/notmuch/database.py bindings/python/notmuch/message.py notmuch.1 NEWS merged by hand, others taken from master. --- d43f6c00b351424e903c2f2b71c34bc5902b467e diff --combined NEWS index 2acdce56,e57e9708..5c5b6458 --- a/NEWS +++ b/NEWS @@@ -1,61 -1,28 +1,85 @@@ +Notmuch 0.12 (2012-xx-xx) +========================= + +Command-Line Interface +---------------------- + +Reply to sender + + "notmuch reply" has gained the ability to create a reply template + for replying just to the sender of the message, in addition to reply + to all. The feature is available through the new command line option + --reply-to=(all|sender). + +Tag exclusion + + Tags can be automatically excluded from search results by adding them + to the new 'search.exclude_tags' option in the Notmuch config file. + + This behaviour can be overridden by explicitly including an excluded + tag in your query, for example: + + notmuch search $your_query and tag:$excluded_tag + + Existing users will probably want to run "notmuch setup" again to add + the new well-commented [search] section to the configuration file. + + For new configurations, accepting the default setting will cause the + tags "deleted" and "spam" to be excluded, equivalent to running: + + notmuch config set search.exclude_tags deleted spam + +Emacs Interface +--------------- + +Reply to sender + + The Emacs interface has, with the new CLI support, gained the + ability to reply to sender in addition to reply to all. In both show + and search modes, 'r' has been bound to reply to sender, replacing + reply to all, which now has key binding 'R'. + +Library changes +--------------- + +New functions + + notmuch_query_add_tag_exclude supports the new tag exclusion + feature. + +Build fixes +----------- + +Compatibility with GMime 2.6 + + It is now possible to build notmuch against both GMime 2.4 and 2.6. + However, a bug in current GMime 2.6 causes notmuch not to report + signatures where the signer key is unavailable (GNOME bug 668085). + + Notmuch 0.11.1 (2012-02-03) + =========================== + + Bug-fix release. + ---------------- + + Fix error handling in python bindings. + + The python bindings in 0.11 failed to detect NULL pointers being + returned from libnotmuch functions and thus failed to raise + exceptions to indicate the error condition. Any subsequent calls + into libnotmuch caused segmentation faults. + + Quote MML tags in replies + + MML tags are text codes that Emacs uses to indicate attachments + (among other things) in messages being composed. The Emacs + interface did not quote MML tags in the quoted text of a reply. + User could be tricked into replying to a maliciously formatted + message and not editing out the MML tags from the quoted text. This + could lead to files from the user's machine being attached to the + outgoing message. The Emacs interface now quotes these tags in + reply text, so that they do not effect outgoing messages. + - Notmuch 0.11 (2012-01-13) ========================= @@@ -168,8 -135,8 +192,8 @@@ Bug-fix release Fix crash in python bindings. - The python bindings did not call g_type_init, which caused crashes - for some, but not all users. + The python bindings did not call g_type_init, which caused crashes + for some, but not all users. Notmuch 0.10.1 (2011-11-25) =========================== @@@ -239,8 -206,8 +263,8 @@@ Add keybinding ('c I') for stashing Mes Do not query on notmuch-search exit - It is harmless to kill the external notmuch process, so the user - is no longer interrogated when they interrupt a search. + It is harmless to kill the external notmuch process, so the user + is no longer interrogated when they interrupt a search. Performance ----------- @@@ -269,9 -236,9 +293,9 @@@ mailing list nmbug - share tags with a given prefix - nmbug helps maintain a git repo containing all tags with a given - prefix (by default "notmuch::"). Tags can be shared by commiting - them to git in one location and restoring in another. + nmbug helps maintain a git repo containing all tags with a given + prefix (by default "notmuch::"). Tags can be shared by commiting + them to git in one location and restoring in another. Notmuch 0.9 (2011-10-01) ======================== @@@ -656,7 -623,7 +680,7 @@@ Ruby bindings are now much more complet s1.union(s2) s2 -= s1 - Removed: + Removed: - len(Messages()) as it exhausted the iterator. Use len(list(Messages())) or Query.count_messages() to get the length. diff --combined emacs/notmuch-mua.el index 023645e3,3e93d7c8..c07b67ba --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@@ -28,26 -28,25 +28,26 @@@ (defcustom notmuch-mua-send-hook '(notmuch-mua-message-send-hook) "Hook run before sending messages." - :group 'notmuch - :type 'hook) + :type 'hook + :group 'notmuch-send + :group 'notmuch-hooks) (defcustom notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full "Function used to generate a `User-Agent:' string. If this is `nil' then no `User-Agent:' will be generated." - :group 'notmuch :type '(choice (const :tag "No user agent string" nil) (const :tag "Full" notmuch-mua-user-agent-full) (const :tag "Notmuch" notmuch-mua-user-agent-notmuch) (const :tag "Emacs" notmuch-mua-user-agent-emacs) (function :tag "Custom user agent function" - :value notmuch-mua-user-agent-full))) + :value notmuch-mua-user-agent-full)) + :group 'notmuch-send) (defcustom notmuch-mua-hidden-headers '("^User-Agent:") "Headers that are added to the `message-mode' hidden headers list." - :group 'notmuch - :type '(repeat string)) + :type '(repeat string) + :group 'notmuch-send) ;; @@@ -72,15 -71,12 +72,15 @@@ (push header message-hidden-headers))) notmuch-mua-hidden-headers)) -(defun notmuch-mua-reply (query-string &optional sender) +(defun notmuch-mua-reply (query-string &optional sender reply-all) (let (headers body (args '("reply"))) (if notmuch-show-process-crypto (setq args (append args '("--decrypt")))) + (if reply-all + (setq args (append args '("--reply-to=all"))) + (setq args (append args '("--reply-to=sender")))) (setq args (append args (list query-string))) ;; This make assumptions about the output of `notmuch reply', but ;; really only that the headers come first followed by a blank @@@ -112,11 -108,15 +112,16 @@@ (if (re-search-backward message-signature-separator nil t) (forward-line -1) (goto-char (point-max))) - (insert body)) + (insert body) + (push-mark)) (set-buffer-modified-p nil) - (message-goto-body)) + (message-goto-body) + ;; Original message may contain (malicious) MML tags. We must + ;; properly quote them in the reply. Note that using `point-max' + ;; instead of `mark' here is wrong. The buffer may include user's + ;; signature which should not be MML-quoted. + (mml-quote-region (point) (point-max))) (defun notmuch-mua-forward-message () (message-forward) @@@ -158,16 -158,16 +163,16 @@@ OTHER-ARGS are passed through to `messa If this variable is left unset, then a list will be constructed from the name and addresses configured in the notmuch configuration file." - :group 'notmuch - :type '(repeat string)) + :type '(repeat string) + :group 'notmuch-send) (defcustom notmuch-always-prompt-for-sender nil "Always prompt for the From: address when composing or forwarding a message. This is not taken into account when replying to a message, because in that case the From: header is already filled in by notmuch." - :group 'notmuch - :type 'boolean) + :type 'boolean + :group 'notmuch-send) (defvar notmuch-mua-sender-history nil) @@@ -222,13 -222,13 +227,13 @@@ the From: address first. (notmuch-mua-forward-message)) (notmuch-mua-forward-message))) -(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender) +(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender reply-all) "Invoke the notmuch reply window." (interactive "P") (let ((sender (when prompt-for-sender (notmuch-mua-prompt-for-sender)))) - (notmuch-mua-reply query-string sender))) + (notmuch-mua-reply query-string sender reply-all))) (defun notmuch-mua-send-and-exit (&optional arg) (interactive "P") diff --combined test/emacs index 8ca4c8a5,2d066ed4..f4a5c816 --- a/test/emacs +++ b/test/emacs @@@ -78,10 -78,10 +78,10 @@@ thread=$(notmuch search --output=thread test_emacs "(notmuch-show \"$thread\") (test-output)" cat <EXPECTED -"Invalid " From" (2001-01-05) (inbox) +Invalid " From (2001-01-05) (inbox) Subject: message-with-invalid-from To: Notmuch Test Suite -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 This is just a test message (#1) EOF @@@ -225,7 -225,7 +225,7 @@@ test_expect_equal_file OUTPUT EXPECTE 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 "(let ((notmuch-fcc-dirs '((\"example.com\" . \"failure\") @@@ -273,6 -273,26 +273,26 @@@ On 01 Jan 2000 12:00:00 -0000, Notmuch EOF test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Quote MML tags in reply" + message_id='test-emacs-mml-quoting@message.id' + add_message [id]="$message_id" \ + "[subject]='$test_subtest_name'" \ + '[body]="<#part disposition=inline>"' + test_emacs "(notmuch-show \"id:$message_id\") + (notmuch-show-reply) + (test-output)" + cat <EXPECTED + From: Notmuch Test Suite + To: + Subject: Re: Quote MML tags in reply + In-Reply-To: + Fcc: ${MAIL_DIR}/sent + --text follows this line-- + On Tue, 05 Jan 2001 15:43:57 -0000, Notmuch Test Suite wrote: + > <#!part disposition=inline> + EOF + test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments" # save as archive to test that Emacs does not re-compress .gz test_emacs '(let ((standard-input "\"attachment1.gz\"")) @@@ -320,7 -340,7 +340,7 @@@ add_message '[from]="Top Poster To: Notmuch Test Suite -Sent: Tue, 05 Jan 2001 15:43:57 -0000 +Sent: Fri, 05 Jan 2001 15:43:57 +0000 Subject: The problem with top-posting Q: Why is top-posting such a bad thing? @@@ -331,7 -351,7 +351,7 @@@ test_emacs "(notmuch-show \"top-posting echo "Notmuch Test Suite (2001-01-05) (inbox) Subject: The problem with top-posting To: Notmuch Test Suite -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? @@@ -340,7 -360,7 +360,7 @@@ Q: What is the most annoying thing in e Top Poster (2001-01-05) (inbox unread) Subject: Re: The problem with top-posting To: Notmuch Test Suite -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 Thanks for the advice! I will be sure to put it to good use. @@@ -373,22 -393,22 +393,22 @@@ add_message '[date]="Sat, 01 Jan 2000 1 '[body]="Unable to stash body. Where did you get it in the first place?!?"' notmuch tag +stashtest id:${gen_msg_id} test_emacs '(notmuch-show "id:\"bought\"") - (notmuch-show-stash-date) - (notmuch-show-stash-from) - (notmuch-show-stash-to) - (notmuch-show-stash-cc) - (notmuch-show-stash-subject) - (notmuch-show-stash-message-id) - (notmuch-show-stash-message-id-stripped) - (notmuch-show-stash-tags) - (notmuch-show-stash-filename) - (switch-to-buffer - (generate-new-buffer "*test-stashing*")) - (dotimes (i 9) - (yank) - (insert "\n") - (rotate-yank-pointer 1)) - (reverse-region (point-min) (point-max)) + (notmuch-show-stash-date) + (notmuch-show-stash-from) + (notmuch-show-stash-to) + (notmuch-show-stash-cc) + (notmuch-show-stash-subject) + (notmuch-show-stash-message-id) + (notmuch-show-stash-message-id-stripped) + (notmuch-show-stash-tags) + (notmuch-show-stash-filename) + (switch-to-buffer + (generate-new-buffer "*test-stashing*")) + (dotimes (i 9) + (yank) + (insert "\n") + (rotate-yank-pointer 1)) + (reverse-region (point-min) (point-max)) (test-output)' cat <EXPECTED Sat, 01 Jan 2000 12:00:00 -0000 @@@ -405,11 -425,11 +425,11 @@@ test_expect_equal_file OUTPUT EXPECTE test_begin_subtest "Stashing in notmuch-search" test_emacs '(notmuch-search "id:\"bought\"") - (notmuch-test-wait) - (notmuch-search-stash-thread-id) - (switch-to-buffer - (generate-new-buffer "*test-stashing*")) - (yank) + (notmuch-test-wait) + (notmuch-search-stash-thread-id) + (switch-to-buffer + (generate-new-buffer "*test-stashing*")) + (yank) (test-output)' sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT test_expect_equal "$(cat OUTPUT)" "thread:XXX" @@@ -438,9 -458,9 +458,9 @@@ test_expect_equal_file OUTPUT EXPECTE test_begin_subtest "Refresh modified show buffer" test_subtest_known_broken test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") - (notmuch-show-toggle-message) - (notmuch-show-next-message) - (notmuch-show-toggle-message) + (notmuch-show-toggle-message) + (notmuch-show-next-message) + (notmuch-show-toggle-message) (test-visible-output "EXPECTED") (notmuch-show-refresh-view) (test-visible-output)'