patch: notmuch-mua.el -- message-hidden-headers
authorTomi Ollila <tomi.ollila@nixu.com>
Sat, 30 Jul 2011 21:46:57 +0000 (00:46 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:13 +0000 (09:39 -0800)
34/23428f8994c2335e8072ef07247f22ed2af45a [new file with mode: 0644]

diff --git a/34/23428f8994c2335e8072ef07247f22ed2af45a b/34/23428f8994c2335e8072ef07247f22ed2af45a
new file mode 100644 (file)
index 0000000..676dda9
--- /dev/null
@@ -0,0 +1,99 @@
+Return-Path: <tomi.ollila@nixu.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7E7E2429E26\r
+       for <notmuch@notmuchmail.org>; Sat, 30 Jul 2011 14:47:01 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ov3o5IYHGF4I for <notmuch@notmuchmail.org>;\r
+       Sat, 30 Jul 2011 14:47:00 -0700 (PDT)\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 53BBD429E25\r
+       for <notmuch@notmuchmail.org>; Sat, 30 Jul 2011 14:47:00 -0700 (PDT)\r
+Received: from taco2.nixu.fi (localhost [127.0.0.1])\r
+       by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
+       p6ULkvEB013386\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)\r
+       for <notmuch@notmuchmail.org>; Sun, 31 Jul 2011 00:46:58 +0300\r
+Received: (from too@localhost)\r
+       by taco2.nixu.fi (8.14.3/8.14.3/Submit) id p6ULkvTL013385;\r
+       Sun, 31 Jul 2011 00:46:57 +0300\r
+X-Authentication-Warning: taco2.nixu.fi: too set sender to\r
+       tomi.ollila@nixu.com using -f\r
+From: Tomi Ollila <tomi.ollila@nixu.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: patch: notmuch-mua.el -- message-hidden-headers\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sun, 31 Jul 2011 00:46:57 +0300\r
+Message-ID: <yf639hnh25q.fsf@taco2.nixu.fi>\r
+User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/22.2 (gnu/linux)\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 30 Jul 2011 21:47:01 -0000\r
+\r
+\r
+notmuch-mua.el fails to byte-compile on emacs 22.2.1\r
+\r
+The reason is bug in function notmuch-mua-add-more-hidden-headers;\r
+on emacs 23.x it compiles ok, but works incorrectly: The check\r
+which check whether the header is there already always returns nil.\r
+Examples:\r
+\r
+(setq foo (list "x" "foo" "bar"))\r
+\r
+(member "foo" 'foo)\r
+\r
+returns nil,\r
+\r
+(member "foo" foo)\r
+\r
+returns list ("foo" bar"), as expected.\r
+\r
+the former on emacs 22.2.1; backtrace buffer appears with content:\r
+\r
+Debugger entered--Lisp error: (wrong-type-argument listp foo)\r
+  member("foo" foo)\r
+  eval((member "foo" (quote foo)))\r
+  eval-last-sexp-1(nil)\r
+  eval-last-sexp(nil)\r
+  call-interactively(eval-last-sexp)\r
+\r
+patch to fix this:\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 274c5da..8824b08 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -65,7 +65,7 @@ list."\r
+ (defun notmuch-mua-add-more-hidden-headers ()\r
+   "Add some headers to the list that are hidden by default."\r
+   (mapc (lambda (header)\r
+-         (when (not (member header 'message-hidden-headers))\r
++         (when (not (member header message-hidden-headers))\r
+            (push header message-hidden-headers)))\r
+        notmuch-mua-hidden-headers))\r
+\r
+Tomi\r