[PATCH 3/4] emacs: Fix `notmuch-user-other-email' when no other emails are configured
authorAustin Clements <amdragon@MIT.EDU>
Thu, 20 Feb 2014 19:16:36 +0000 (14:16 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:06 +0000 (10:00 -0800)
c9/94db369b854198e23340729b06326f3e4c8dfc [new file with mode: 0644]

diff --git a/c9/94db369b854198e23340729b06326f3e4c8dfc b/c9/94db369b854198e23340729b06326f3e4c8dfc
new file mode 100644 (file)
index 0000000..5f313e3
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <amdragon@mit.edu>\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 26D09431FBD\r
+       for <notmuch@notmuchmail.org>; Thu, 20 Feb 2014 11:16:54 -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 o0gkHtNWsGH6 for <notmuch@notmuchmail.org>;\r
+       Thu, 20 Feb 2014 11:16:50 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
+       [18.7.68.36])\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 56627431FC2\r
+       for <notmuch@notmuchmail.org>; Thu, 20 Feb 2014 11:16:48 -0800 (PST)\r
+X-AuditID: 12074424-f79e26d000000c70-09-5306549f7e98\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id B6.37.03184.F9456035; Thu, 20 Feb 2014 14:16:47 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s1KJGhEP014146; \r
+       Thu, 20 Feb 2014 14:16:43 -0500\r
+Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s1KJGfuW012827\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 20 Feb 2014 14:16:42 -0500\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1WGZ6v-0004ZA-2E; Thu, 20 Feb 2014 14:16:41 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/4] emacs: Fix `notmuch-user-other-email' when no other\r
+       emails are configured\r
+Date: Thu, 20 Feb 2014 14:16:36 -0500\r
+Message-Id: <1392923797-17045-4-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+In-Reply-To: <1392923797-17045-1-git-send-email-amdragon@mit.edu>\r
+References: <1392923797-17045-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsUixCmqrDs/hC3YYM9LIYvXCyaxWVy/OZPZ\r
+       gclj9dpOFo9nq24xBzBFcdmkpOZklqUW6dslcGVcOMhfsJ+tYtuV62wNjGtYuxg5OSQETCSO\r
+       3z4PZYtJXLi3ng3EFhKYzSRx9bRnFyMXkL2RUeLSmwlMEM4RJomGi5vYIJy5jBILX10Aa2cT\r
+       0JDYtn85I4gtIiAtsfPubLA4s4CNxOaPj4HiHBzCAnES/ZdjQEwWAVWJxZdDQCp4BRwkpvd3\r
+       Qx2hJLHw1DYwm1PAUWJp/wdWkHIhoJrOrToTGPkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st\r
+       0jXXy80s0UtNKd3ECAohdheVHYzNh5QOMQpwMCrx8J6QYgsWYk0sK67MPcQoycGkJMq7IgAo\r
+       xJeUn1KZkVicEV9UmpNafIhRgoNZSYS3yQYox5uSWFmVWpQPk5LmYFES5621+BUkJJCeWJKa\r
+       nZpakFoEk5Xh4FCS4A0NBmoULEpNT61Iy8wpQUgzcXCCDOcBGh4ZBDK8uCAxtzgzHSJ/ilFR\r
+       Spz3KUhCACSRUZoH1wuL8VeM4kCvCPPOB1nBA0wPcN2vgAYzAQ0u2cgKMrgkESEl1cDYEJ62\r
+       0uaX+NOvc1fnTlgofsak5Q9XyMl93LKed6bpWc+Vz1vkLNa+fjMz03znp7MUDk3dm+a4XyRX\r
+       4fIlu91m8p3fl+y1a3RvbPs3qzU8NX5+RfLp5pSnHDra6h5p241+bDNRjl2WmaP0K8ZMa/NB\r
+       7+8Hjyu+3XKh8fj8Q986z/VMvmRf1PNKiaU4I9FQi7moOBEAFwhhQcwCAAA=\r
+Cc: bjonnh-nm@bjonnh.net\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: Thu, 20 Feb 2014 19:16:54 -0000\r
+\r
+Thanks to the previous patch, this no longer crashes in this\r
+situation, but now would return ("").  Fix it to return () when no\r
+emails are configured.\r
+---\r
+ emacs/notmuch-lib.el | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 09110b5..2fefdad 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -220,7 +220,7 @@ on the command line, and then retry your notmuch command")))\r
\r
+ (defun notmuch-user-other-email ()\r
+   "Return the user.other_email value (as a list) from the notmuch configuration."\r
+-  (split-string (notmuch-config-get "user.other_email") "\n"))\r
++  (split-string (notmuch-config-get "user.other_email") "\n" t))\r
\r
+ (defun notmuch-poll ()\r
+   "Run \"notmuch new\" or an external script to import mail.\r
+-- \r
+1.8.4.rc3\r
+\r