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 6E05E431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:08 -0800 (PST)
\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 4PeMi-r9cAqH for <notmuch@notmuchmail.org>;
\r
17 Fri, 16 Dec 2011 20:21:07 -0800 (PST)
\r
18 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
19 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 B2EF6429E26 for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:06 -0800
\r
23 Received: by mail-ww0-f45.google.com with SMTP id ds13so5879879wgb.2
\r
24 for <notmuch@notmuchmail.org>; Fri, 16 Dec 2011 20:21:06 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=py0MWGpr22YIzT2Tt6ySsYH4nwzowJbiWP2T7oIFBls=;
\r
28 b=EGu6LYO5Epq3waO6V19JXyj5nAd2E4OI1bFvBEDoEK/n43nrl4O/9i/8br5FGs38QO
\r
29 rFoyhEDJ05bJgqgfxkmcAEa+tj3cnvfRmp7wWeDQgBcAwaH8V/R51iMpJSkrmSCumas9
\r
30 uBtJYSvqaH34AqlWAiDYlzHXxrTNtW/KbsUeY=
\r
31 Received: by 10.227.203.78 with SMTP id fh14mr7338535wbb.12.1324095666357;
\r
32 Fri, 16 Dec 2011 20:21:06 -0800 (PST)
\r
33 Received: from localhost ([91.144.186.21])
\r
34 by mx.google.com with ESMTPS id gn4sm15789108wib.20.2011.12.16.20.21.05
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Fri, 16 Dec 2011 20:21:05 -0800 (PST)
\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 4/4] emacs: do not call `notmuch-hello-mode' on update
\r
40 Date: Sat, 17 Dec 2011 08:20:19 +0400
\r
41 Message-Id: <1324095619-10870-4-git-send-email-dmitry.kurochkin@gmail.com>
\r
42 X-Mailer: git-send-email 1.7.7.3
\r
43 In-Reply-To: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
44 References: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Sat, 17 Dec 2011 04:21:09 -0000
\r
59 `notmuch-hello' should call `notmuch-hello-mode' function only when
\r
60 run for the first time. But before the change, `notmuch-hello' used
\r
61 `kill-all-local-variables' to remove editable widgets fields. This
\r
62 caused the major mode to be reset, and `notmuch-hello-mode' to be
\r
65 The patch manually deletes all editable widget fields and removes
\r
66 `kill-all-local-variables' call.
\r
68 emacs/notmuch-hello.el | 11 +++++++----
\r
70 2 files changed, 7 insertions(+), 5 deletions(-)
\r
72 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
73 index ca3a381..3b21f55 100644
\r
74 --- a/emacs/notmuch-hello.el
\r
75 +++ b/emacs/notmuch-hello.el
\r
76 @@ -403,11 +403,14 @@ Complete list of currently available key bindings:
\r
79 (widget-value (widget-at)))
\r
82 + (inhibit-read-only t))
\r
84 - (kill-all-local-variables)
\r
85 - (let ((inhibit-read-only t))
\r
87 + ;; delete all editable widget fields
\r
88 + (let ((all widget-field-list))
\r
89 + (mapc 'widget-delete widget-field-list))
\r
93 (unless (eq major-mode 'notmuch-hello-mode)
\r
94 (notmuch-hello-mode))
\r
95 diff --git a/test/emacs b/test/emacs
\r
96 index b4c2444..dffad0f 100755
\r
99 @@ -486,7 +486,6 @@ counter=$(test_emacs \
\r
100 test_expect_equal "$counter" 1
\r
102 test_begin_subtest "notmuch-hello-mode hook is not called on updates"
\r
103 -test_subtest_known_broken
\r
104 counter=$(test_emacs \
\r
105 '(let ((notmuch-hello-mode-hook-counter 0))
\r
106 (kill-buffer "*notmuch-hello*")
\r