From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 84BFC421192 for ; Wed, 29 Jun 2011 12:57:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.7 X-Spam-Level: * X-Spam-Status: No, score=1.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.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 FBMF-Z+8Ghn9 for ; Wed, 29 Jun 2011 12:57:31 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 71EC542118E for ; Wed, 29 Jun 2011 12:57:31 -0700 (PDT) Received: by bwg12 with SMTP id 12so1467159bwg.26 for ; Wed, 29 Jun 2011 12:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=D8s0y2o+g1XjDbe16lQDbMZVuLHCxpxxUU8hNwp+/no=; b=Vkr0OGehQvM4zKsvAGAQSj4P+K8hLSLNfp7c9Umzs9VFql1Slpod11kKe4D57nkpqI KoSL5X1DcByAwUK1hpT+7D3ZEyKDoI/h8qdy4nN/FeYJgXTCkpbR3PXwBswkMKq0oNCe LeX0YK6a5Zbyy0H+tgKJu+K6MrqGO7JAGyL+8= Received: by 10.204.47.68 with SMTP id m4mr1163806bkf.119.1309377450010; Wed, 29 Jun 2011 12:57:30 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id o3sm1438380bka.12.2011.06.29.12.57.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Jun 2011 12:57:29 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: Re: [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature In-Reply-To: <87pqlxw7d0.fsf@gmail.com> References: <1309312132-14564-1-git-send-email-dmitry.kurochkin@gmail.com> <87pqlxw7d0.fsf@gmail.com> User-Agent: Notmuch/0.5-297-gfb148d8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Jun 2011 23:57:24 +0400 Message-ID: <87tyb8v2aj.fsf@gmail.com> 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: Wed, 29 Jun 2011 19:57:32 -0000 On Wed, 29 Jun 2011 09:10:19 +0400, Dmitry Kurochkin wrote: > On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin wrote: > > Add Emacs test to check that `notmuch-show-advance-and-archive' > > works for the last message in thread with invisible signature. > > --- > > > > This patch series fixes the bug reported by Sebastien in [1]. I > > was able to reproduce it and confirm that the second patch from > > this series fixes the problem. Unfortunately, I can not explain > > why it fixes it. The patch uses a cleaner approach for visible > > text search. But the old approach should work fine as well. > > Apparently, it does not work when `invisible' property is not a > > single symbol but a list (which was changed in > > 95ef8da29439f2e79115c36ab4d2a80aef1a1462). I suspect that it is > > an Emacs bug. I plan to look at it later. > > > > Turns out that `point-invisible-p' is a function from notmuch-lib.el, I > did not realize that before. It implements a custom visibility check > which is incomplete and does not work correctly when `invisible' > property is a list. That is why the previous code (which used > `point-invisible-p') had the bug. I sent another patch that removes > `point-invisible-p' function. > > > Another issue is that the test does not demonstrate the bug. > > Again, I do not really know why. It passes both before and after > > the fix. Although if I run the test commands by hand I hit the > > bug. I guess it has something to do with emacs daemon mode when > > the buffer is not visible. I hope someone with a better elisp > > knowledge can tell what is going on and how to make the test > > work. > > > > Now it is clear where the bug was. Remaining question is how to test > it. > I have posted a new version of this patch series [1]. It fixes the test to actually demonstrate the bug. Regards, Dmitry [1] id:"1309376558-26284-1-git-send-email-dmitry.kurochkin@gmail.com" > Regards, > Dmitry > > > I believe patches 2 and 3 can be pushed after review even without > > a working test. > > > > Regards, > > Dmitry > > > > [1] id:"8739j5rn2d.fsf@cern.ch" > > > > test/emacs | 12 ++++++++++++ > > 1 files changed, 12 insertions(+), 0 deletions(-) > > > > diff --git a/test/emacs b/test/emacs > > index e59de47..65a96a5 100755 > > --- a/test/emacs > > +++ b/test/emacs > > @@ -347,4 +347,16 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail. > > (test-visible-output)' > > test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages > > > > +test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature' > > +message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu' > > +message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net' > > +test_emacs "(notmuch-search \"$message1 or $message2\") > > + (notmuch-test-wait) > > + (notmuch-search-show-thread) > > + (notmuch-show-advance-and-archive) > > + (test-output)" > > +test_emacs "(notmuch-show \"$message2\") > > + (test-output \"EXPECTED\")" > > +test_expect_equal_file OUTPUT EXPECTED > > + > > test_done > > -- > > 1.7.5.4 > >