Re: [PATCH 2/2] emacs: Correctly quote non-text/plain parts in reply
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Sat, 5 May 2012 19:17:11 +0000 (13:17 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:56 +0000 (09:46 -0800)
c1/8da856c42dfc57cb5a45f7c4807cbd57545fd7 [new file with mode: 0644]

diff --git a/c1/8da856c42dfc57cb5a45f7c4807cbd57545fd7 b/c1/8da856c42dfc57cb5a45f7c4807cbd57545fd7
new file mode 100644 (file)
index 0000000..8d22dd0
--- /dev/null
@@ -0,0 +1,107 @@
+Return-Path: <awg@xvx.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id D6957431FB6\r
+       for <notmuch@notmuchmail.org>; Sat,  5 May 2012 12:17:13 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Pfw6Mv-WH8OX for <notmuch@notmuchmail.org>;\r
+       Sat,  5 May 2012 12:17:13 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 24C48431FAE\r
+       for <notmuch@notmuchmail.org>; Sat,  5 May 2012 12:17:12 -0700 (PDT)\r
+Received: by lahc1 with SMTP id c1so2986661lah.26\r
+       for <notmuch@notmuchmail.org>; Sat, 05 May 2012 12:17:11 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+       :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding:x-gm-message-state;\r
+       bh=kC/dUFhu3KS4zKxBJJVterEz6jkc7gYycYu1W3ymGUU=;\r
+       b=iq80T7shXaeE63O4IOX6ufXND/4AFaU9Fp1xYZ0f9eiZPNv399Tqjvpw+MNyhSneFK\r
+       /EUeSV+6qgvM5NLDs8c+50JqIsJ16HXgpBQUjwW4rrnBQaBwqUvwX8HGeFkPp49tme9T\r
+       7nStAj0kim7APYpy7oA8jIl3/1ewvG3p5e3IEbnoq3EPSvPNVt00fl2n57qpzDvF0peY\r
+       LOt3qvF1KQhZSO9/vQlNsMjDqrDI7jfDnVzkjFYDaB7cbz19LhWo//RdCFuTVy+dMlDj\r
+       neBuTwO6nPbmKVn9n+VL/Z9EjFWSjP9MglsS3ggHyMgjREopM5nB89AqvOlhuXoOZK/n\r
+       eL4A==\r
+MIME-Version: 1.0\r
+Received: by 10.152.145.228 with SMTP id sx4mr9549189lab.45.1336245431449;\r
+       Sat, 05 May 2012 12:17:11 -0700 (PDT)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.82.163 with HTTP; Sat, 5 May 2012 12:17:11 -0700 (PDT)\r
+X-Originating-IP: [96.52.216.56]\r
+In-Reply-To: <87obq3ahss.fsf@awakening.csail.mit.edu>\r
+References: <1335056093-17621-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1335056093-17621-3-git-send-email-awg+notmuch@xvx.ca>\r
+       <87obq3ahss.fsf@awakening.csail.mit.edu>\r
+Date: Sat, 5 May 2012 13:17:11 -0600\r
+X-Google-Sender-Auth: gtB9x2dQA7VydaakUn0XfAiyRqA\r
+Message-ID:\r
+ <CAMoJFUuf9n73W5SFnRrbuYt7VQNq3iHO5-F2vdRRf9bQZqgxaw@mail.gmail.com>\r
+Subject: Re: [PATCH 2/2] emacs: Correctly quote non-text/plain parts in reply\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQmHqs9IGT/xr+LWxSOT4pLEud/lRDeM7KMBLT1QixmvDgrvQ3dK7ZlgBLTerxd6tTjIPw52\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 05 May 2012 19:17:14 -0000\r
+\r
+On Fri, May 4, 2012 at 1:05 PM, Austin Clements <amdragon@mit.edu> wrote:\r
+> Personally I think the narrowing trick is clever, but I worry that it\r
+> assumes too much about how mm-display-part works, since mm-display-part\r
+> just takes a buffer in the handle. =A0Is there a reason this doesn't\r
+> simply use notmuch-show-mm-display-part-inline? =A0Something like\r
+> (untested)\r
+>\r
+> (defun notmuch-mua-insert-quotable-part (message part)\r
+> =A0(notmuch-show-mm-display-part-inline\r
+> =A0 message part (plist-get part :id) (plist-get part :content-type)))\r
+>\r
+> You might not even need notmuch-mua-insert-quotable-part. =A0(Why does\r
+> notmuch-show-mm-display-part-inline take all of those redundant\r
+> arguments?)\r
+\r
+This almost works - patch forthcoming. The trouble with just using\r
+notmuch-show-mm-display-part-inline is that it doesn't move the point\r
+to the end of the text, which we rely on for message-cite-original to\r
+quote the right region. But, I can use\r
+notmuch-show-mm-display-part-inline (moved to the lib) by narrowing\r
+first, and setting the point after using it. If we don't narrow, the\r
+point ends up after the user's signature (which is inserted by message\r
+mode before we insert the quoted text), and the signature ends up\r
+being quoted.\r
+\r
+> In general, I feel like the reply code should share more structure with\r
+> the notmuch-show code. =A0I worry that the quoted text people wind up wit=\r
+h\r
+> may not resemble the text they saw in the show buffer because the two\r
+> code paths use different rules. =A0But addressing that (if it's\r
+> addressable) should be done in a later series.\r
+\r
+Yeah, I agree with this. Maybe before 0.14 I will try to do some\r
+refactoring to share code between reply and show, at least in emacs.\r
+\r
+-- Adam\r