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