1 Return-Path: <dmitry.kurochkin@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 5F916429E5B
\r
6 for <notmuch@notmuchmail.org>; Tue, 28 Jun 2011 22:10:27 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id T2-dGGSxgBtO for <notmuch@notmuchmail.org>;
\r
17 Tue, 28 Jun 2011 22:10:26 -0700 (PDT)
\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id DFC1E429E55
\r
22 for <notmuch@notmuchmail.org>; Tue, 28 Jun 2011 22:10:25 -0700 (PDT)
\r
23 Received: by bwg12 with SMTP id 12so813087bwg.26
\r
24 for <notmuch@notmuchmail.org>; Tue, 28 Jun 2011 22:10:24 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type;
\r
28 bh=b2DzGBIJBJt5uCN0196YSwC9R6hTOytsC9AOCMey3bE=;
\r
29 b=t6MyIzjPOFsB/w0Fr6OFwL+D0HQ1/6Js/iaVb8MFw1YQXUB8ynkITi+tOs6gyn572i
\r
30 pe1D7rb0EBdQ4zSNDJx51by1JAeTJu1nlh3AxSHaZKBJ9RSrdxwYR4WOtk2GB3N5vnxI
\r
31 QEMUmf25+RDB9mK2w+oIjQ2RFRh7W/hsIZ+TY=
\r
32 Received: by 10.204.171.1 with SMTP id f1mr287078bkz.194.1309324224530;
\r
33 Tue, 28 Jun 2011 22:10:24 -0700 (PDT)
\r
34 Received: from localhost ([91.144.186.21])
\r
35 by mx.google.com with ESMTPS id ek1sm795354bkb.9.2011.06.28.22.10.23
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Tue, 28 Jun 2011 22:10:23 -0700 (PDT)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: Re: [PATCH 1/3] test: `notmuch-show-advance-and-archive' with
\r
42 In-Reply-To: <1309312132-14564-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
43 References: <1309312132-14564-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
44 User-Agent: Notmuch/0.5-297-gfb148d8 (http://notmuchmail.org) Emacs/23.3.1
\r
45 (x86_64-pc-linux-gnu)
\r
46 Date: Wed, 29 Jun 2011 09:10:19 +0400
\r
47 Message-ID: <87pqlxw7d0.fsf@gmail.com>
\r
49 Content-Type: text/plain; charset=us-ascii
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Wed, 29 Jun 2011 05:10:27 -0000
\r
64 On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
\r
65 > Add Emacs test to check that `notmuch-show-advance-and-archive'
\r
66 > works for the last message in thread with invisible signature.
\r
69 > This patch series fixes the bug reported by Sebastien in [1]. I
\r
70 > was able to reproduce it and confirm that the second patch from
\r
71 > this series fixes the problem. Unfortunately, I can not explain
\r
72 > why it fixes it. The patch uses a cleaner approach for visible
\r
73 > text search. But the old approach should work fine as well.
\r
74 > Apparently, it does not work when `invisible' property is not a
\r
75 > single symbol but a list (which was changed in
\r
76 > 95ef8da29439f2e79115c36ab4d2a80aef1a1462). I suspect that it is
\r
77 > an Emacs bug. I plan to look at it later.
\r
80 Turns out that `point-invisible-p' is a function from notmuch-lib.el, I
\r
81 did not realize that before. It implements a custom visibility check
\r
82 which is incomplete and does not work correctly when `invisible'
\r
83 property is a list. That is why the previous code (which used
\r
84 `point-invisible-p') had the bug. I sent another patch that removes
\r
85 `point-invisible-p' function.
\r
87 > Another issue is that the test does not demonstrate the bug.
\r
88 > Again, I do not really know why. It passes both before and after
\r
89 > the fix. Although if I run the test commands by hand I hit the
\r
90 > bug. I guess it has something to do with emacs daemon mode when
\r
91 > the buffer is not visible. I hope someone with a better elisp
\r
92 > knowledge can tell what is going on and how to make the test
\r
96 Now it is clear where the bug was. Remaining question is how to test
\r
102 > I believe patches 2 and 3 can be pushed after review even without
\r
108 > [1] id:"8739j5rn2d.fsf@cern.ch"
\r
110 > test/emacs | 12 ++++++++++++
\r
111 > 1 files changed, 12 insertions(+), 0 deletions(-)
\r
113 > diff --git a/test/emacs b/test/emacs
\r
114 > index e59de47..65a96a5 100755
\r
117 > @@ -347,4 +347,16 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
\r
118 > (test-visible-output)'
\r
119 > test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
121 > +test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature'
\r
122 > +message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu'
\r
123 > +message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net'
\r
124 > +test_emacs "(notmuch-search \"$message1 or $message2\")
\r
125 > + (notmuch-test-wait)
\r
126 > + (notmuch-search-show-thread)
\r
127 > + (notmuch-show-advance-and-archive)
\r
129 > +test_emacs "(notmuch-show \"$message2\")
\r
130 > + (test-output \"EXPECTED\")"
\r
131 > +test_expect_equal_file OUTPUT EXPECTED
\r