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 1623C431E82 for ; Fri, 31 May 2013 11:27:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.7 X-Spam-Level: ** X-Spam-Status: No, score=2.7 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, FREEMAIL_REPLY=2.499, 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 OYaQSx6Km-Si for ; Fri, 31 May 2013 11:27:10 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A8182431FC3 for ; Fri, 31 May 2013 11:27:10 -0700 (PDT) Received: by mail-wi0-f169.google.com with SMTP id hn14so1039998wib.4 for ; Fri, 31 May 2013 11:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=RbrhzDJwEqx+Ul7LMtfn0y98gKl2+bIWzXmfzm5erMU=; b=0q4Tz2eQmMpM/JD0dZrA3k2fB5yCBKg4kXVk9v/OAa4UJ7AhjfFQyHpScQTy5v1v2j fW/ndmeIEiAb4QqNtys/dSf59xj93X9KFis5hk7fFAIyTliJvjTTubvFrEjSpG+2U95U JZELOCiIowGeEE9qMzW6klUQdRcDivcXV2ops2AbI8GvZ5CxN2mq3piVd0dpE1z1KySY hvPuGcWNgtbMDQJiWgRp+I/E1tg5z5lF52CFjUaVgfsEoTd7iTJtC0pWDZHuTvZJL0Ak VoGzm0FwDsumKbRlcYYrN3ATTlZUVzFATjndkVVwEcZQTVhFsAO7wG0GPSrjkWkbKQCd HMGQ== X-Received: by 10.194.179.102 with SMTP id df6mr10605508wjc.42.1370024828113; Fri, 31 May 2013 11:27:08 -0700 (PDT) Received: from localhost (92.40.240.237.threembb.co.uk. [92.40.240.237]) by mx.google.com with ESMTPSA id b11sm5654506wiv.10.2013.05.31.11.27.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 May 2013 11:27:07 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org, Austin Clements , Adam Wolfe Gordon Subject: [PATCH v3 0/5] emacs: show: lazy handling of hidden parts Date: Fri, 31 May 2013 19:26:41 +0100 Message-Id: <1370024806-6616-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.10.4 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: Fri, 31 May 2013 18:27:18 -0000 This is a substantially reworked version of id:1369555061-21361-1-git-send-email-markwalters1009@gmail.com attempting to answer the (very constructive) criticism of Austin. The changes are: move the insert-part-header call from the insert-part-text/plain function to insert-bodypart in line with all the other part insertion functions. The other change in patch 2 is that we no longer need to pass declared-type down to the part insertion functions so we remove this argument. The actual invisibility code has been substantially reworked. There were two main aims: to remove the insertion of dummy text and to make sure that toggling a lazy-part which cannot be rendered automatically calls the default action for such a part (e.g. saving or viewing). I have split this code into 3 pieces: two pieces of simple code movement as preparation and then the new code to do the actual lazy part handling. All tests pass and everything I can think of to try works (viewing pdf, lazy rendered html, lazy rendered pdf, toggling all types, repeated toggling) but there are a lot of cases so testing is especially helpful. Best wishes Mark Mark Walters (5): emacs: show: fake wash parts are handled at insert-bodypart level emacs: show: move the insertion of the header button to the top level emacs: show: pass button to create-overlays emacs: show: modify the way hidden state is recorded. emacs: show: implement lazy hidden part handling emacs/notmuch-show.el | 183 +++++++++++++++++++++++++++++-------------------- 1 file changed, 107 insertions(+), 76 deletions(-) -- 1.7.10.4