[PATCH v1 2/3] emacs: Add `notmuch-user-all-email'.

Subject: [PATCH v1 2/3] emacs: Add `notmuch-user-all-email'.

Date: Fri, 5 Sep 2014 13:59:28 +0100

To: notmuch@notmuchmail.org

Cc:

From: David Edmondson


`notmuch-user-all-email' returns a list of the user's primary and
secondary email addresses.
---
 emacs/notmuch-lib.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 19269e3..685469c 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -228,6 +228,10 @@ on the command line, and then retry your notmuch command")))
   "Return the user.other_email value (as a list) from the notmuch configuration."
   (split-string (notmuch-config-get "user.other_email") "\n" t))
 
+(defun notmuch-user-all-email ()
+  "Return all email addresses for the user from the notmuch configuration."
+  (append (list (notmuch-user-primary-email)) (notmuch-user-other-email)))
+
 (defun notmuch-poll ()
   "Run \"notmuch new\" or an external script to import mail.
 
-- 
1.8.5.2 (Apple Git-48)


Thread: