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 ADCE4429E29
\r
6 for <notmuch@notmuchmail.org>; Sun, 3 Jul 2011 21:07:50 -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 eDgsk62nq813 for <notmuch@notmuchmail.org>;
\r
17 Sun, 3 Jul 2011 21:07:50 -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 BD299431FB6
\r
22 for <notmuch@notmuchmail.org>; Sun, 3 Jul 2011 21:07:49 -0700 (PDT)
\r
23 Received: by mail-bw0-f53.google.com with SMTP id 12so4447816bwg.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 03 Jul 2011 21:07:49 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=nhCvXIRCs02cK6O1qVptjrzeWYOjv3j0kYJze6F6zAc=;
\r
28 b=BrOA05zo0ubh7FPqs3aHaIaH65JXe/3H9gNUyAe4U24XUdXMiSua46cqdC9Io0zvLy
\r
29 cHfv5mxXFMraYOu5SvcXJTkDP7HDeDXSgwX4HE6BWDaczVISPWlm0fs1onH0ZYAGwyRj
\r
30 d0/GesWd871YI1zvMn+oc0wkpZSQw+lqw5KFE=
\r
31 Received: by 10.204.0.67 with SMTP id 3mr415343bka.37.1309752469448;
\r
32 Sun, 03 Jul 2011 21:07:49 -0700 (PDT)
\r
33 Received: from localhost ([91.144.186.21])
\r
34 by mx.google.com with ESMTPS id e6sm5166171bka.23.2011.07.03.21.07.47
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Sun, 03 Jul 2011 21:07:48 -0700 (PDT)
\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v2 3/3] test: add emacs test for hiding a message following an
\r
41 Date: Mon, 4 Jul 2011 08:07:21 +0400
\r
42 Message-Id: <1309752441-10651-4-git-send-email-dmitry.kurochkin@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.5.4
\r
44 In-Reply-To: <1309752441-10651-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 References: <1309744743-8556-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
46 <1309752441-10651-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Mon, 04 Jul 2011 04:07:50 -0000
\r
61 Human-friendly scenario:
\r
63 * open a thread where a message which ends with an HTML part is
\r
64 followed by another message
\r
66 * make the first message visible
\r
68 * goto the beginning of the second message (first line, first colon)
\r
72 Result: nothing happens except for "No URL at point" message
\r
74 Expected result: the second message is shown/hidden
\r
76 The root cause is that the HTML part has `keymap' text property set.
\r
77 In particular, "RET" is bound to visit a URL at point. The problem is
\r
78 that `keymap' property affects the next character following the region
\r
79 it is set to (see elisp manual [1]). Hence, the first character of
\r
80 the next message has a keymap inherited from the HTML part.
\r
82 [1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html
\r
84 test/emacs | 26 ++++++++++++++++++++++++++
\r
85 1 files changed, 26 insertions(+), 0 deletions(-)
\r
87 diff --git a/test/emacs b/test/emacs
\r
88 index f465e2b..8b627c7 100755
\r
91 @@ -342,4 +342,30 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
\r
92 (test-visible-output)'
\r
93 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
95 +test_begin_subtest 'Hiding message following HTML part'
\r
96 +test_subtest_known_broken
\r
97 +id='html-message@notmuchmail.org'
\r
98 +emacs_deliver_message \
\r
101 + "(message-goto-eoh)
\r
102 + (insert \"Message-ID: <$id>\n\")
\r
103 + (message-goto-body)
\r
104 + (mml-insert-part \"text/html\")
\r
105 + (insert \"<body>This is a test HTML message</body>\")"
\r
106 +emacs_deliver_message \
\r
107 + 'Reply to HTML message' \
\r
108 + 'This is a reply to the test HTML message' \
\r
109 + "(message-goto-eoh)
\r
110 + (insert \"In-Reply-To: <$id>\n\")"
\r
111 +test_emacs "(notmuch-show \"id:$id\") \
\r
112 + (notmuch-show-next-message) \
\r
113 + (command-execute (key-binding (kbd \"RET\"))) \
\r
114 + (test-visible-output)"
\r
115 +test_emacs "(notmuch-show \"id:$id\") \
\r
116 + (notmuch-show-next-message) \
\r
117 + (notmuch-show-toggle-message) \
\r
118 + (test-visible-output \"EXPECTED\")"
\r
119 +test_expect_equal_file OUTPUT EXPECTED
\r