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 4F7CE431FB6 for ; Wed, 5 Dec 2012 07:59: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 u9b540Wn1WBX for ; Wed, 5 Dec 2012 07:59:08 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 2F6CA431FAE for ; Wed, 5 Dec 2012 07:59:08 -0800 (PST) X-AuditID: 1209190c-b7f886d000000936-37-50bf6f4bff2a Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 11.80.02358.B4F6FB05; Wed, 5 Dec 2012 10:59:07 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id qB5Fx6lA005707; Wed, 5 Dec 2012 10:59:07 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qB5Fx4AD003807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 5 Dec 2012 10:59:06 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) (envelope-from ) id 1TgHNI-0007ss-G6; Wed, 05 Dec 2012 10:59:04 -0500 From: Austin Clements To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH v2] emacs: show: refresh buffer did not remove overlays In-Reply-To: <1354709509-22123-1-git-send-email-markwalters1009@gmail.com> References: <20121203164730.GE1020@mit.edu> <1354709509-22123-1-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.14+100~gcb9b0b0 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Wed, 05 Dec 2012 10:59:04 -0500 Message-ID: <87mwxscwxj.fsf@awakening.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsUixCmqrOudvz/A4OxZFYvVc3ksrt+cyezA 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZTzeZF1wkKfi/dppzA2Mfzi7GDk5JARMJBZ1 vGSCsMUkLtxbz9bFyMUhJLCPUeJoYzsrhLOeUWL+sxZmCOcCk8TVma+YIJwljBJ/nvxlBOln E9CXWLF2EiuILSLgKvH022dmEFtYwFvizo77QDUcHJwCXhJNPdwgppBApsTmGREgpqhAvMTl pQogxSwCqhIf7t8CG8ILdNz2pctYIGxBiZMzn4DZzAJaEjf+vWSawCgwC0lqFpLUAkamVYyy KblVurmJmTnFqcm6xcmJeXmpRbqGermZJXqpKaWbGMGhKMmzg/HNQaVDjAIcjEo8vJLG+wKE WBPLiitzDzFKcjApifL+zN0fIMSXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEt9gPKMebklhZlVqU D5OS5mBREue9nHLTX0ggPbEkNTs1tSC1CCYrw8GhJMFbkQfUKFiUmp5akZaZU4KQZuLgBBnO AzQ8DqSGt7ggMbc4Mx0if4pRUUqcdwJIQgAkkVGaB9cLSxWvGMWBXhHmnQhSxQNMM3Ddr4AG MwENjmIHG1ySiJCSamAMaLje6+FS2zVRwqjp9DWp1+5Tk9/cDLjPf3DRnflywlO1z1YtEY1T vW9bMO/EzXUdZ5W9jNlcbnnzf/+7U7l2kVL0F5ny7JlSl2f2cGW/1GWr+O5rtfjVu8mdk902 enUJtL9m5RUx4VknZjrlmF/WtL60qW3PbR9+j7Dbr7mxoDrCRTi1yVOJpTgj0VCLuag4EQD+ XroU8AIAAA== 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: Wed, 05 Dec 2012 15:59:12 -0000 LGTM. On Wed, 05 Dec 2012, Mark Walters wrote: > Previously refreshing the notmuch show buffer did not remove overlays > which meant that if the user refreshed a message with images the > images would remain and then the new text was added after. > > One might have guessed that erase-buffer would have removed them but > it seems not. Thus force the removal of overlays with remove-overlays. > --- > > This version fixes the problems that Austin mentioned in his review. I > have not investigated whether the erase-buffer here can be removed: it > looks like it could be but the worst that this does is call > erase-buffer twice (slightly wasteful but no harm). > > Best wishes > > Mark > > > emacs/notmuch-show.el | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index 4d6c014..20f8997 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -1185,6 +1185,10 @@ reset based on the original query." > (let ((inhibit-read-only t) > (state (unless reset-state > (notmuch-show-capture-state)))) > + ;; erase-buffer does not seem to remove overlays, which can lead > + ;; to weird effects such as remaining images, so remove them > + ;; manually. > + (remove-overlays) > (erase-buffer) > (notmuch-show-build-buffer) > (if state > -- > 1.7.9.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch