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 46F26431FD0 for ; Mon, 9 Jan 2012 17:53:33 -0800 (PST) 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 JyM78WbgLOCI for ; Mon, 9 Jan 2012 17:53:32 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4E46C431FB6 for ; Mon, 9 Jan 2012 17:53:32 -0800 (PST) Received: by bkat2 with SMTP id t2so93876bka.26 for ; Mon, 09 Jan 2012 17:53:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.120.11 with SMTP id fw11mr8048335bkc.89.1326160410609; Mon, 09 Jan 2012 17:53:30 -0800 (PST) Received: by 10.205.33.73 with HTTP; Mon, 9 Jan 2012 17:53:30 -0800 (PST) X-Originating-IP: [12.50.241.130] In-Reply-To: References: <1326009162-19524-1-git-send-email-awg+notmuch@xvx.ca> Date: Mon, 9 Jan 2012 18:53:30 -0700 Message-ID: Subject: Re: [PATCH 0/4] Quoting HTML-only emails in replies redux From: Adam Wolfe Gordon To: Aaron Ecay Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Wed, 11 Jan 2012 18:03:20 -0800 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: Tue, 10 Jan 2012 01:53:33 -0000 Thanks for the suggestions. Specific comments inline: On Sun, Jan 8, 2012 at 18:36, Aaron Ecay wrote: >> There should probably be some customize variables for this in emacs, to = control >> (for example) whether to quote HTML parts and whether to prefer HTML or >> plaintext parts for quoting. Any suggestions for what should be customiz= able >> would be appreciated. > > I think two variables should suffice: one (boolean) to control whether > to quote standalone text/html parts, and one to control which parts of a > multipart/alternative part to quote. =A0The latter should take possible > values 'text, 'html, and 'both. =A0This requires the emacs reply > functionality to distinguish between html parts that are part of a > multipart/alternative and those which are not, which (AFAICT) the > current code doesn=92t do. The first one I think is obvious, and easy to add. My previous version actually had such an option, but I didn't bother with it this time in the interest of getting the patch out. I'll add this in and send a new version. Regarding the second suggestion, you're right that the current code doesn't differentiate between text parts that are part of a multipart/alternative and ones that aren't. However, it does only include parts with inline disposition, so it shouldn't end up quoting stuff intended as attachments. My thinking in the current operation was to keep most of the complexity (i.e. going through the MIME parts to pick out the relevant ones) in the C code, so that it doesn't have to be implemented in each client - and also so I didn't have to implement it in emacs lisp ;-). Do you have some ideas for a JSON format that's more complex than the current one (to include the information necessary for making decisions about what to quote), but less complex than something like notmuch show --format=3Djson (which would require the client to descend the MIME tree completely to create a reply)? A third customization option I was thinking about is a way to control the format of the first line of the body (On $date, $person wrote). I think it would be fairly simple to let people specify an arbitrary format using any of the headers of the original message, so you would set it to something like "On %date%, %from% wrote", or "Quoth %from% (%date%)". This might be particularly useful to users who correspond normally in a language other than English. Anyone have thoughts on whether this is worth implementing? > I haven=92t tested the patch yet, but it looks very promising. =A0Thanks! Thanks for the suggestions - let me know if you have a chance to try it out= . --=20 Adam Wolfe Gordon