[PATCH 5/5] news: Update for changes to notmuch_database_get_directory
[notmuch-archives.git] / 34 / 23428f8994c2335e8072ef07247f22ed2af45a
1 Return-Path: <tomi.ollila@nixu.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 7E7E2429E26\r
6         for <notmuch@notmuchmail.org>; Sat, 30 Jul 2011 14:47:01 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id ov3o5IYHGF4I for <notmuch@notmuchmail.org>;\r
16         Sat, 30 Jul 2011 14:47:00 -0700 (PDT)\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 53BBD429E25\r
21         for <notmuch@notmuchmail.org>; Sat, 30 Jul 2011 14:47:00 -0700 (PDT)\r
22 Received: from taco2.nixu.fi (localhost [127.0.0.1])\r
23         by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
24         p6ULkvEB013386\r
25         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)\r
26         for <notmuch@notmuchmail.org>; Sun, 31 Jul 2011 00:46:58 +0300\r
27 Received: (from too@localhost)\r
28         by taco2.nixu.fi (8.14.3/8.14.3/Submit) id p6ULkvTL013385;\r
29         Sun, 31 Jul 2011 00:46:57 +0300\r
30 X-Authentication-Warning: taco2.nixu.fi: too set sender to\r
31         tomi.ollila@nixu.com using -f\r
32 From: Tomi Ollila <tomi.ollila@nixu.com>\r
33 To: notmuch@notmuchmail.org\r
34 Subject: patch: notmuch-mua.el -- message-hidden-headers\r
35 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
36         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
37         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
38 Date: Sun, 31 Jul 2011 00:46:57 +0300\r
39 Message-ID: <yf639hnh25q.fsf@taco2.nixu.fi>\r
40 User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/22.2 (gnu/linux)\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Sat, 30 Jul 2011 21:47:01 -0000\r
56 \r
57 \r
58 notmuch-mua.el fails to byte-compile on emacs 22.2.1\r
59 \r
60 The reason is bug in function notmuch-mua-add-more-hidden-headers;\r
61 on emacs 23.x it compiles ok, but works incorrectly: The check\r
62 which check whether the header is there already always returns nil.\r
63 Examples:\r
64 \r
65 (setq foo (list "x" "foo" "bar"))\r
66 \r
67 (member "foo" 'foo)\r
68 \r
69 returns nil,\r
70 \r
71 (member "foo" foo)\r
72 \r
73 returns list ("foo" bar"), as expected.\r
74 \r
75 the former on emacs 22.2.1; backtrace buffer appears with content:\r
76 \r
77 Debugger entered--Lisp error: (wrong-type-argument listp foo)\r
78   member("foo" foo)\r
79   eval((member "foo" (quote foo)))\r
80   eval-last-sexp-1(nil)\r
81   eval-last-sexp(nil)\r
82   call-interactively(eval-last-sexp)\r
83 \r
84 patch to fix this:\r
85 \r
86 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
87 index 274c5da..8824b08 100644\r
88 --- a/emacs/notmuch-mua.el\r
89 +++ b/emacs/notmuch-mua.el\r
90 @@ -65,7 +65,7 @@ list."\r
91  (defun notmuch-mua-add-more-hidden-headers ()\r
92    "Add some headers to the list that are hidden by default."\r
93    (mapc (lambda (header)\r
94 -         (when (not (member header 'message-hidden-headers))\r
95 +         (when (not (member header message-hidden-headers))\r
96             (push header message-hidden-headers)))\r
97         notmuch-mua-hidden-headers))\r
98 \r
99 Tomi\r