From: Mark Walters Date: Mon, 12 May 2014 08:11:10 +0000 (+0100) Subject: Re: [PATCH v2] emacs: Improve the cited message included in replies X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ece77ec13153ea9c84ce25ff022873f24b87951f;p=notmuch-archives.git Re: [PATCH v2] emacs: Improve the cited message included in replies --- diff --git a/86/d877b6a3bb61b14e8c3e1b3bd70c565e2c662e b/86/d877b6a3bb61b14e8c3e1b3bd70c565e2c662e new file mode 100644 index 000000000..f6642f6c0 --- /dev/null +++ b/86/d877b6a3bb61b14e8c3e1b3bd70c565e2c662e @@ -0,0 +1,149 @@ +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 4A4C7431FC0 + for ; Mon, 12 May 2014 01:11:19 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + 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 56xUSlTY0z81 for ; + Mon, 12 May 2014 01:11:13 -0700 (PDT) +Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com + [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5CF54431FBF + for ; Mon, 12 May 2014 01:11:13 -0700 (PDT) +Received: by mail-wi0-f176.google.com with SMTP id n15so4004984wiw.3 + for ; Mon, 12 May 2014 01:11:12 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=ycS+rkS1OWHXfrNz2JIn6iFOEOgn6QO7oEE1MIcIcVw=; + b=EiQidQSqZFSQYQ/DvFaHYF7ZuqIM+7X7ht6yEuoXRdOG9+61PSh/PcrXGCFDJRMUgq + 2JhFjkvynyT8zB8C1J9Evqj05EuQlU9HaA3V+L0OooESobyBf19UrB6wg66REqwQfdIw + FXt3LCKnqf9YHGXfzF+B8SF5sXDknLaZ7TskbyqxGxGnZCuJJaoQHDVDS8AR0bF9QxuH + zK5mrdGUYN6tOyCcaMGwVWazcaDtLBE6McIjBGiPDewZ4nuZKwnlfIGRzVeyGbQeRXhS + lWIQO/2nQjzuDgbDlihnTR9s7c5ioNsknLUasRL+/wY+pcolHFbZ+OmedTHV0rbGVXOu + dqtw== +X-Received: by 10.194.122.6 with SMTP id lo6mr20077133wjb.38.1399882272255; + Mon, 12 May 2014 01:11:12 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by mx.google.com with ESMTPSA id c7sm16890357wjf.19.2014.05.12.01.11.11 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 12 May 2014 01:11:11 -0700 (PDT) +From: Mark Walters +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] emacs: Improve the cited message included in replies +In-Reply-To: +References: <1399482846-25308-1-git-send-email-dme@dme.org> + <1399530272-11857-1-git-send-email-dme@dme.org> + <87ha4y8286.fsf@qmul.ac.uk> + +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 12 May 2014 09:11:10 +0100 +Message-ID: <87mwenzaap.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Mon, 12 May 2014 08:11:19 -0000 + +On Mon, 12 May 2014, David Edmondson wrote: +> On Sat, May 10 2014, Mark Walters wrote: +>> On Thu, 08 May 2014, David Edmondson wrote: +>>> emacs: Improve the cited message included in replies +>>> +>>> v2: +>>> - Don't run the text/plain hooks when generating the message to quote. +>>> +>> +>> In principle I like this approach: keeping show and reply closely linked +>> seems good. +>> +>> At the moment, as you say, the tests don't all pass. The first reason is +>> that this puts in buttons for the parts. Stopping that happening is not +>> completely trivial as we need to make sure that the instruction gets +>> passed down to sub-parts of multiparts etc. (You could argue that the +>> 'no-button option to notmuch-show-insert-bodypart is buggy as it only +>> stops the top level button for the part) +> +> That seems straightforward. I was sure that there was a variable listing +> part types that didn't require buttons (which could be let-bound), but I +> must have been imagining it. +> +> Inserting the button text for the trivial case (single text/plain part) +> is already special-cased in the show code. In the case where only a +> single part is being shown (e.g. multipart/alternative with text/plain +> and text/html with the text/html hidden) it would make sense _not_ to +> show the button text. For more complex messages (e.g. multipart/mixed +> with text/plain and message/rfc822, where the message/rfc822 contains +> multiple parts), showing the button text seems useful to allow the +> different sub-sections of the reply to be distinguished. + +Yes that is true: I hadn't thought of that. + +> Perhaps there is an approach based on the complexity of the quoted +> message that should determine whether the button text is inserted (which +> might also apply (in modified form?) in normal message display)? Normal +> message display has to allow for some interaction with the parts +> (show/hide, etc.), which doesn't apply to citation. +> +>> Secondly, the existing code only includes text sub-parts of the +>> message. I would think your version might include any sub-parts show is +>> configured to display, including, say images. (However, in my testing +>> images didn't seem to be included: I am not sure why.) +> +> Eek. + +I phrased this badly. I don't want images included: I just couldn't see +why they weren't with your current patch (as they are displayed in show +mode) + +> +> Inserting the images in the reply buffer itself would not be +> difficult. What should happen when the user hits 'send'? We currently +> don't have a composition mode that would allow us to generate useful +> output in that case. Adding one feels like a lot of work. In many cases +> it would be necessary to transform the message into HTML to properly +> represent the content. +> +> MML (the markup used in `message-mode') is really not designed for +> something this complex. +> +>> I can't tell how much work it is to modify show to take account of these +>> things, so am not sure if this is the best approach, or just adding +>> something to deal with rfc822 to our existing reply code is easier. +> +> The approach in this patch mostly involves removing code - adding +> special case code to notmuch-mua.el to support message/rfc822 involves +> _adding_ a bunch more complex code (I tried that first). + +I guess my concern with adding to the show code is that is already more +complicated than I would like (invisibility, hidden parts, lazy parts +etc). But I am very definitely interested in seeing what a more finished +version of your patch would look like. + +Best wishes + +Mark +