--- /dev/null
+Return-Path: <dme@fenchurch.hh.sledj.net>\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 595B7431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:59:37 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.379\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.379 tagged_above=-999 required=5\r
+ tests=[NO_DNS_FOR_FROM=0.379] 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 KqDRZpFMJK3t for <notmuch@notmuchmail.org>;\r
+ Fri, 5 Sep 2014 05:59:32 -0700 (PDT)\r
+Received: from fenchurch.hh.sledj.net (disaster-area.hh.sledj.net\r
+ [81.149.164.25])\r
+ by olra.theworths.org (Postfix) with ESMTP id 836FA431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 5 Sep 2014 05:59:32 -0700 (PDT)\r
+Received: by fenchurch.hh.sledj.net (Postfix, from userid 501)\r
+ id DDB011316558; Fri, 5 Sep 2014 13:59:29 +0100 (BST)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v1 2/3] emacs: Add `notmuch-user-all-email'.\r
+Date: Fri, 5 Sep 2014 13:59:28 +0100\r
+Message-Id: <1409921969-65129-3-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)\r
+In-Reply-To: <1409921969-65129-1-git-send-email-dme@dme.org>\r
+References: <1409921969-65129-1-git-send-email-dme@dme.org>\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: Fri, 05 Sep 2014 12:59:37 -0000\r
+\r
+`notmuch-user-all-email' returns a list of the user's primary and\r
+secondary email addresses.\r
+---\r
+ emacs/notmuch-lib.el | 4 ++++\r
+ 1 file changed, 4 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 19269e3..685469c 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -228,6 +228,10 @@ on the command line, and then retry your notmuch command")))\r
+ "Return the user.other_email value (as a list) from the notmuch configuration."\r
+ (split-string (notmuch-config-get "user.other_email") "\n" t))\r
+ \r
++(defun notmuch-user-all-email ()\r
++ "Return all email addresses for the user from the notmuch configuration."\r
++ (append (list (notmuch-user-primary-email)) (notmuch-user-other-email)))\r
++\r
+ (defun notmuch-poll ()\r
+ "Run \"notmuch new\" or an external script to import mail.\r
+ \r
+-- \r
+1.8.5.2 (Apple Git-48)\r
+\r