From 9796b435c55461b72c04d7697d7e60a1e899c7e5 Mon Sep 17 00:00:00 2001 From: Adam Wolfe Gordon Date: Thu, 9 Feb 2012 17:21:52 +1700 Subject: [PATCH] [PATCH v4 0/4] Quoting HTML parts in reply (and other reply enhancements) --- a7/4632e7a5610a35f56f1c471ea8d2b26cc9554e | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 a7/4632e7a5610a35f56f1c471ea8d2b26cc9554e diff --git a/a7/4632e7a5610a35f56f1c471ea8d2b26cc9554e b/a7/4632e7a5610a35f56f1c471ea8d2b26cc9554e new file mode 100644 index 000000000..c4c4607f1 --- /dev/null +++ b/a7/4632e7a5610a35f56f1c471ea8d2b26cc9554e @@ -0,0 +1,111 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6E6A6431FAE + for ; Wed, 8 Feb 2012 16:22:09 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 4oAH+LfMdr6N for ; + Wed, 8 Feb 2012 16:22:08 -0800 (PST) +Received: from smtp-out-04.shaw.ca (smtp-out-04.shaw.ca [64.59.134.12]) + by olra.theworths.org (Postfix) with ESMTP id 71D51431FAF + for ; Wed, 8 Feb 2012 16:22:08 -0800 (PST) +Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd6ml3no-ssvc.prod.shaw.ca) + ([10.0.144.222]) + by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:07 -0700 +X-Cloudmark-SP-Filtered: true +X-Cloudmark-SP-Result: v=1.1 cv=gFGh1ScE7ROJHT2jhivHYaSHya8441O0LZB7wkhlVyo= + c=1 sm=1 + a=CMkXlkAlBFUA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17 + a=FPbcA7frrQUDSoSD1uIA:9 a=jAR98ZH7ysiss9ynm54A:7 a=odvB31Xb1hMA:10 + a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 +Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56]) + by pd6ml3no-dmz.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:07 -0700 +Received: by lagos.xvx.ca (Postfix, from userid 1000) + id 3262F802A3DC; Wed, 8 Feb 2012 17:22:07 -0700 (MST) +From: Adam Wolfe Gordon +To: notmuch@notmuchmail.org +Subject: [PATCH v4 0/4] Quoting HTML parts in reply (and other reply + enhancements) +Date: Wed, 8 Feb 2012 17:21:52 -0700 +Message-Id: <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca> +X-Mailer: git-send-email 1.7.5.4 +In-Reply-To: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca> +References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 09 Feb 2012 00:22:09 -0000 + +Hi everyone, + +Here is a new and much-improved version of my series [1] adding support for +quoting HTML parts in replies using a JSON reply format. This version is, as +the diffs indicate, much more ambitious than previous versions, especially +on the emacs front: + +* The JSON reply format now only includes headers (for both the original and + reply messages), as Dmitry pointed out that non-UTF8 characters sets cannot + be properly inlined in JSON. + +* Thus, emacs now uses notmuch show to fetch the body of the original message + before creating the quoted body of the reply. + +* In order to simplify this use of show, the JSON format no longer implies + --entire-thread. The other consumer of --format=json (notmuch-query.el) has + been updated to use --entire-thread when that's what it means, and the man + page has been updated. + +* Emacs now pays attention to multipart structures when deciding which parts + to quote in a reply. This uses essentially the same logic as in show, some + of which has been factored out into notmuch-lib.el. In particular, emacs will + include all the text parts of a message, except the non-preferred ones in a + multipart/alternative part. + +* There are two new emacs test cases to test and demonstrate the new reply + functionality. They show how it works a multipart/mixed and multipart/alternative + messages. + +I think that covers everything... Please let me know if there is something I +haven't explained well. And, of course, please send reviews on this extensive +change. + +[1] id:"1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca" + +Adam Wolfe Gordon (4): + test: Add broken test for the new JSON reply format. + reply: Add a JSON reply format. + man: Update notmuch-reply man page for JSON format. + emacs: Use the new JSON reply format and message-cite-original + + emacs/notmuch-lib.el | 39 +++++++++++ + emacs/notmuch-mua.el | 136 +++++++++++++++++++++++++++----------- + emacs/notmuch-query.el | 2 +- + emacs/notmuch-show.el | 24 +------ + man/man1/notmuch-reply.1 | 5 ++ + man/man1/notmuch-show.1 | 6 +-- + notmuch-reply.c | 167 ++++++++++++++++++++++++++++++++++------------ + notmuch-show.c | 1 - + test/emacs | 101 +++++++++++++++++++++++++++- + test/multipart | 7 ++ + 10 files changed, 375 insertions(+), 113 deletions(-) + +-- +1.7.5.4 + -- 2.26.2