From: Jani Nikula Date: Sun, 2 Dec 2012 19:48:00 +0000 (+0200) Subject: Re: [PATCH (draft) 0/2] Allow emacs to toggle display of all parts including multipart X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b7f44eb87c7e5498078a40a29b0d22c4a4825ef7;p=notmuch-archives.git Re: [PATCH (draft) 0/2] Allow emacs to toggle display of all parts including multipart --- diff --git a/a4/7838133bd2fd5b14a7e99d71457d339ab27b9a b/a4/7838133bd2fd5b14a7e99d71457d339ab27b9a new file mode 100644 index 000000000..128b7025f --- /dev/null +++ b/a4/7838133bd2fd5b14a7e99d71457d339ab27b9a @@ -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 ABC2B431FAF + for ; Sun, 2 Dec 2012 11:48:12 -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 3yFHoChwDjQa for ; + Sun, 2 Dec 2012 11:48:08 -0800 (PST) +Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com + [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 69B0E431FAE + for ; Sun, 2 Dec 2012 11:48:08 -0800 (PST) +Received: by mail-lb0-f181.google.com with SMTP id ge1so1909606lbb.26 + for ; Sun, 02 Dec 2012 11:48:04 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:x-gm-message-state; + bh=0LAAsEJfAnSg9rUi36Z94yfasLyK1kL7zwFnCRy5Lg0=; + b=Z5IxaYYtS2FLhgvVkYwkIyo/vH1ByGQmVZ1d1EGcpaTP8YxEflyEaaM+zeTrzI0vgj + b6gXrnn0o5DKUvF72bVdGuzi1h479BY3HfC0Z4zHerWvEXAmujYWE6zgGxpxhtx8aiEo + CMcjU0JR9bwP/h5McR1XCrnZNBFNo01tGMIIorP4YwnLyZwcGHgtQqgvqBIJIhMDT4um + Xgy/xfcysIo/P5OLJLl3K5KcuCNPb0O+H3n4by5SI3hnnu3KZkWWTNnrMpIUhITLAqqM + FaQYdzF5wHNrOhYC8GSjXDBt2ed5lXZEzHXzZ4uhZzoO7GmKWiNcXACZRk0WLBqzoMAD + kuJQ== +Received: by 10.112.10.98 with SMTP id h2mr3352804lbb.127.1354477684064; + Sun, 02 Dec 2012 11:48:04 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id gr12sm4333716lab.3.2012.12.02.11.48.01 + (version=SSLv3 cipher=OTHER); Sun, 02 Dec 2012 11:48:02 -0800 (PST) +From: Jani Nikula +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH (draft) 0/2] Allow emacs to toggle display of all parts + including multipart +In-Reply-To: <1351152563-27277-1-git-send-email-markwalters1009@gmail.com> +References: <1351152563-27277-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.14+128~g6dd5220 (http://notmuchmail.org) Emacs/23.4.1 + (i686-pc-linux-gnu) +Date: Sun, 02 Dec 2012 21:48:00 +0200 +Message-ID: <87mwxwme1b.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQkSu8u2fpSNDzZiYstDveYIwgZ/jvRfNgFPqHf4r4lpuuBVb2GTbEBbgJDu1iLmNdt4UWO2 +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: Sun, 02 Dec 2012 19:48:12 -0000 + +On Thu, 25 Oct 2012, Mark Walters wrote: +> This patch series adds a function to toggle the display of any emacs +> part in the show buffer. This is particularly useful for +> multipart/alternative where the parts have different information. + +I didn't look at the code, but I tried it. And I like it. There are some +annoyances and some things I'll still want to customize for myself, but +I really like it. + +> The first patch binds this toggle to 't' on the part button. This +> patch works by itself. + +I'd like to rebind RET to do the toggle by default. I don't think it's +very useful to be able to save multipart/alternative parts by default. + +> The second patch makes it that "viewing" (ie v on the part-button) a +> "not shown" part displays the part in the buffer. Note this is not a +> toggle since having displayed the part in the buffer the user may wish +> to view the part externally (eg if it is a text/html part). +> +> Caveats: +> the patches work by reloading the whole buffer: this may mean +> extra messages appear in the thread. This is not ideal but is +> the same as toggling indentation etc. + +It's all right. + +> the reload saves state as normal but this means the view +> returns to the top of the current message. Since we know +> exactly where the user was (ie on the button) this should be +> restored. + +This is annoying, and should be fixed eventually (but this can come +afterwards). One option would be to just take a line count from the +beginning of the message to the button, and return point to the button +after refresh. This should work even if new messages show up. + +> for technical reasons the "view" part functionality in the +> second patch only works for view called explicitly: not if +> the user has customised the default action to be view and +> calls that. This is easy to fix but the most natural way +> would break existing customisation of this action. +> +> reloading the buffer without keeping state does not currently +> reset the toggled parts. Again this is easy to fix but lets +> see if people like the general approach first. + +IMHO can be fixed later. + +One more wishlist item, which also doesn't need to be part of this +series, or by you: I'd like to be able to specify *which* +multipart/alternative parts should be displayed in addition to +preferred. A list of (regexps matching) mime types to always open, +whether they're preferred or not. I've previously sent patches to this +effect, but they were never merged (I can repost if you want). + +BR, +Jani. + + +> +> Best wishes +> +> Mark +> +> +> Mark Walters (2): +> emacs: allow the user to toggle the visibility of +> multipart/alternative parts +> emacs: show: make "view part" show hidden parts +> +> emacs/notmuch-show.el | 53 ++++++++++++++++++++++++++++++++++++++++-------- +> 1 files changed, 44 insertions(+), 9 deletions(-) +> +> -- +> 1.7.9.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch