1 Return-Path: <markwalters1009@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B9B3C431FAE
\r
6 for <notmuch@notmuchmail.org>; Wed, 5 Dec 2012 04:12:02 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id 6VOGGDGMRfmN for <notmuch@notmuchmail.org>;
\r
18 Wed, 5 Dec 2012 04:12:02 -0800 (PST)
\r
19 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com
\r
20 [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 2621C431FB6
\r
23 for <notmuch@notmuchmail.org>; Wed, 5 Dec 2012 04:12:02 -0800 (PST)
\r
24 Received: by mail-wi0-f169.google.com with SMTP id hq12so1676972wib.2
\r
25 for <notmuch@notmuchmail.org>; Wed, 05 Dec 2012 04:11:59 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=bPjU01hRxu1BibQhnq0W8aPcUJGF0uVKeUCLCXaJ3Ys=;
\r
29 b=bzKPCzHOidI2YQ+Yzvp0AY5gxmH6P7q73fkUZQe38copqLEwsqOGAICPlMKBLcLvT9
\r
30 ZwBKho38125HpPgJxoi6MvEPD7ji5Zeb9CzTWShSOJ13whCF4bnOVZ/KFwluEdihobI8
\r
31 5RaXEgD+bRWydBYB/PeihVpwmdE19QYG3wSunZuqnjZGbp+ZLhbk3IOBIZEfkOCd4hD5
\r
32 4k+uPD44s8p9eKe0J+ZsPYR0rubESa5QKaYHujjBDiYjhI0svXojU/XFSqUMnP5r0XAY
\r
33 aREKQ2R8Pj3I2twQGzj/zSM1osaYSh4ZvTQHOGTNyXR4Ib/ADwqFJnOPORtd3FMpD8WI
\r
35 Received: by 10.180.81.170 with SMTP id b10mr2803549wiy.16.1354709519504;
\r
36 Wed, 05 Dec 2012 04:11:59 -0800 (PST)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPS id y3sm18821305wix.6.2012.12.05.04.11.57
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Wed, 05 Dec 2012 04:11:58 -0800 (PST)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v2] emacs: show: refresh buffer did not remove overlays
\r
44 Date: Wed, 5 Dec 2012 12:11:49 +0000
\r
45 Message-Id: <1354709509-22123-1-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.9.1
\r
47 In-Reply-To: <20121203164730.GE1020@mit.edu>
\r
48 References: <20121203164730.GE1020@mit.edu>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Wed, 05 Dec 2012 12:12:02 -0000
\r
63 Previously refreshing the notmuch show buffer did not remove overlays
\r
64 which meant that if the user refreshed a message with images the
\r
65 images would remain and then the new text was added after.
\r
67 One might have guessed that erase-buffer would have removed them but
\r
68 it seems not. Thus force the removal of overlays with remove-overlays.
\r
71 This version fixes the problems that Austin mentioned in his review. I
\r
72 have not investigated whether the erase-buffer here can be removed: it
\r
73 looks like it could be but the worst that this does is call
\r
74 erase-buffer twice (slightly wasteful but no harm).
\r
81 emacs/notmuch-show.el | 4 ++++
\r
82 1 files changed, 4 insertions(+), 0 deletions(-)
\r
84 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
85 index 4d6c014..20f8997 100644
\r
86 --- a/emacs/notmuch-show.el
\r
87 +++ b/emacs/notmuch-show.el
\r
88 @@ -1185,6 +1185,10 @@ reset based on the original query."
\r
89 (let ((inhibit-read-only t)
\r
90 (state (unless reset-state
\r
91 (notmuch-show-capture-state))))
\r
92 + ;; erase-buffer does not seem to remove overlays, which can lead
\r
93 + ;; to weird effects such as remaining images, so remove them
\r
97 (notmuch-show-build-buffer)
\r