Re: [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes
authorPieter Praet <pieter@praet.org>
Wed, 16 Nov 2011 10:56:59 +0000 (11:56 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:12 +0000 (09:40 -0800)
f2/f887e2113696d68dc0103911b7069ae7c26ffa [new file with mode: 0644]

diff --git a/f2/f887e2113696d68dc0103911b7069ae7c26ffa b/f2/f887e2113696d68dc0103911b7069ae7c26ffa
new file mode 100644 (file)
index 0000000..1d8543b
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <pieter@praet.org>\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 96333431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 02:58:02 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 I99Y-2kTXp0B for <notmuch@notmuchmail.org>;\r
+       Wed, 16 Nov 2011 02:58:01 -0800 (PST)\r
+Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id ACAA3429E26\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 02:58:01 -0800 (PST)\r
+Received: by wyg19 with SMTP id 19so335416wyg.26\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 02:57:59 -0800 (PST)\r
+Received: by 10.180.81.73 with SMTP id y9mr34883441wix.37.1321441079192;\r
+       Wed, 16 Nov 2011 02:57:59 -0800 (PST)\r
+Received: from localhost ([109.131.148.49])\r
+       by mx.google.com with ESMTPS id v6sm16106432wix.1.2011.11.16.02.57.57\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Wed, 16 Nov 2011 02:57:57 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes\r
+In-Reply-To: <87zkg2a7pd.fsf@rocinante.cs.unb.ca>\r
+References:\r
+ <87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>\r
+       <87zkg2a7pd.fsf@rocinante.cs.unb.ca>\r
+User-Agent: Notmuch/0.9+76~g2fd88e6 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+Date: Wed, 16 Nov 2011 11:56:59 +0100\r
+Message-ID: <87pqgsfi84.fsf@praet.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Wed, 16 Nov 2011 10:58:02 -0000\r
+\r
+On Fri, 11 Nov 2011 12:29:34 -0500, David Bremner <david@tethera.net> wrote:\r
+> On Sat, 16 Apr 2011 15:12:43 +0200, Pieter Praet <pieter@praet.org> wrote:\r
+> > Calling notmuch-help in notmuch-hello-mode results in error\r
+> > "apply: Wrong type argument: listp, keymap"\r
+> \r
+> Hi Pieter;\r
+> \r
+> I'm a little confused here. I still get the same error after applying\r
+> your patch. Is there a followup patch I missed?\r
+> \r
+\r
+Hmm, it works here...\r
+\r
+\r
+I've tried cooking up a proper test:\r
+\r
+  #+begin_src sh\r
+    test_begin_subtest "Help in notmuch-hello"\r
+    test_emacs '(let ((major-mode '\''notmuch-hello-mode))\r
+        (notmuch-help)\r
+        (test-output))'\r
+    cat <<EOF >EXPECTED\r
+    Placeholder for actual expected output...\r
+    EOF\r
+    test_expect_equal_file OUTPUT EXPECTED\r
+  #+end_src\r
+\r
+... but I'm making some stupid mistake, because it doesn't output\r
+*anything*, not even for `notmuch-search-mode' and `notmuch-show-mode'.\r
+\r
+\r
+It works when running Emacs like this, though:\r
+\r
+  #+begin_src sh\r
+    emacs --no-init-file --eval '(progn\r
+        (add-to-list '\''load-path (concat\r
+                (getenv "HOME") "/src/dev/notmuch/emacs"))\r
+        (require '\''notmuch)\r
+        (notmuch-hello)\r
+        (notmuch-help))'\r
+  #+end_src\r
+\r
+\r
+Anyways, it's a rather lame patch (even more so when taking my horrible\r
+typo into consideraton) so I wouldn't waste too much time on it if I\r
+were you.  Duplication is evil, so this bug should be fixed in\r
+`notmuch-substitute-one-command-key-with-prefix' instead.\r
+\r
+> David\r
+\r
+\r
+Peace\r
+\r
+-- \r
+Pieter\r