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 5F916429E5B for ; Tue, 28 Jun 2011 22:10:27 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 T2-dGGSxgBtO for ; Tue, 28 Jun 2011 22:10:26 -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 DFC1E429E55 for ; Tue, 28 Jun 2011 22:10:25 -0700 (PDT) Received: by bwg12 with SMTP id 12so813087bwg.26 for ; Tue, 28 Jun 2011 22:10:24 -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=b2DzGBIJBJt5uCN0196YSwC9R6hTOytsC9AOCMey3bE=; b=t6MyIzjPOFsB/w0Fr6OFwL+D0HQ1/6Js/iaVb8MFw1YQXUB8ynkITi+tOs6gyn572i pe1D7rb0EBdQ4zSNDJx51by1JAeTJu1nlh3AxSHaZKBJ9RSrdxwYR4WOtk2GB3N5vnxI QEMUmf25+RDB9mK2w+oIjQ2RFRh7W/hsIZ+TY= Received: by 10.204.171.1 with SMTP id f1mr287078bkz.194.1309324224530; Tue, 28 Jun 2011 22:10:24 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id ek1sm795354bkb.9.2011.06.28.22.10.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 22:10:23 -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: <1309312132-14564-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1309312132-14564-1-git-send-email-dmitry.kurochkin@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 09:10:19 +0400 Message-ID: <87pqlxw7d0.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 05:10:27 -0000 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. 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 >