From: David Edmondson Date: Fri, 5 Sep 2014 12:59:28 +0000 (+0100) Subject: [PATCH v1 2/3] emacs: Add `notmuch-user-all-email'. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa74ae28ae84b7950ef5b77be5d38b40e1aa03d0;p=notmuch-archives.git [PATCH v1 2/3] emacs: Add `notmuch-user-all-email'. --- diff --git a/22/a4d2faa8d0270cb692f806143c9f74aa02c110 b/22/a4d2faa8d0270cb692f806143c9f74aa02c110 new file mode 100644 index 000000000..5c50d72f6 --- /dev/null +++ b/22/a4d2faa8d0270cb692f806143c9f74aa02c110 @@ -0,0 +1,68 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 595B7431FB6 + for ; Fri, 5 Sep 2014 05:59:37 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.379 +X-Spam-Level: +X-Spam-Status: No, score=0.379 tagged_above=-999 required=5 + tests=[NO_DNS_FOR_FROM=0.379] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id KqDRZpFMJK3t for ; + Fri, 5 Sep 2014 05:59:32 -0700 (PDT) +Received: from fenchurch.hh.sledj.net (disaster-area.hh.sledj.net + [81.149.164.25]) + by olra.theworths.org (Postfix) with ESMTP id 836FA431FAF + for ; Fri, 5 Sep 2014 05:59:32 -0700 (PDT) +Received: by fenchurch.hh.sledj.net (Postfix, from userid 501) + id DDB011316558; Fri, 5 Sep 2014 13:59:29 +0100 (BST) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [PATCH v1 2/3] emacs: Add `notmuch-user-all-email'. +Date: Fri, 5 Sep 2014 13:59:28 +0100 +Message-Id: <1409921969-65129-3-git-send-email-dme@dme.org> +X-Mailer: git-send-email 1.8.5.2 (Apple Git-48) +In-Reply-To: <1409921969-65129-1-git-send-email-dme@dme.org> +References: <1409921969-65129-1-git-send-email-dme@dme.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 05 Sep 2014 12:59:37 -0000 + +`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) +