--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 CF413431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 8 Apr 2013 23:32:09 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 KigqdARTbsVT for <notmuch@notmuchmail.org>;\r
+ Mon, 8 Apr 2013 23:32:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6036B431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 8 Apr 2013 23:32:05 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id F1F60100093;\r
+ Tue, 9 Apr 2013 09:32:02 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jed Brown <jed@59A2.org>, David Bremner <david@tethera.net>,\r
+ Jani Nikula <jani@nikula.org>, Karl Fogel <kfogel@red-bean.com>,\r
+ Daniel Bergey <bergey@alum.mit.edu>\r
+Subject: Re: [PATCH] emacs: add missing paren to fix defun in\r
+ notmuch-address.el.\r
+In-Reply-To: <87ip3wbj7g.fsf@mcs.anl.gov>\r
+References: <87wqsfik5l.fsf@floss.red-bean.com>\r
+ <87mwtah2hd.fsf@zancas.localnet>\r
+ <877gkeau42.fsf@floss.red-bean.com>\r
+ <m2ppy5v3mc.fsf@guru.guru-group.fi> <8738v1jtzc.fsf@nikula.org>\r
+ <87k3odgutd.fsf@zancas.localnet> <87ip3wbj7g.fsf@mcs.anl.gov>\r
+User-Agent: Notmuch/0.15.2+75~gd7fa7c4 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 09 Apr 2013 09:32:02 +0300\r
+Message-ID: <m2hajgxli5.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: notmuch@notmuchmail.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: Tue, 09 Apr 2013 06:32:11 -0000\r
+\r
+On Tue, Apr 09 2013, Jed Brown wrote:\r
+\r
+> David Bremner <david@tethera.net> writes:\r
+>\r
+>> Squashed sounds good to me too. Sorry I'm too lazy/busy at the moment to\r
+>> do it myself.\r
+>\r
+> I tested the attached and it's working as expected. Sent as an\r
+> attachment to preserve author information.\r
+\r
+LGTM (this time tested, too). Also compared diffs by hand, change as announced.\r
+comments in id:m26207wgyt.fsf@guru.guru-group.fi (amend!) apply. \r
+\r
+Tomi\r
+\r
+\r
+>>From 5404ac5bf13f8b5349d5b94f9f2000e9d1832b83 Mon Sep 17 00:00:00 2001\r
+> From: Daniel Bergey <bergey@alum.mit.edu>\r
+> Date: Mon, 8 Apr 2013 19:55:04 -0500\r
+> Subject: [PATCH] emacs: functions to import sender or recipient into BBDB [v2]\r
+>\r
+>>From a show buffer, notmuch-bbdb/snarf-from imports the sender into\r
+> bbdb. notmuch-bbdb/snarf-to imports all recipients. Newly imported\r
+> contacts are reported in the minibuffer / Messages buffer.\r
+>\r
+> Both functions use the BBDB parser to recognize email address formats.\r
+>\r
+> [v2] Fixes missing close parenthesis in original.\r
+> Spotted by Karl Fogel <kfogel@red-bean.com>.\r
+> ---\r
+> emacs/notmuch-address.el | 41 +++++++++++++++++++++++++++++++++++++++++\r
+> 1 file changed, 41 insertions(+)\r
+>\r
+> diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+> index 2bf762b..4eda098 100644\r
+> --- a/emacs/notmuch-address.el\r
+> +++ b/emacs/notmuch-address.el\r
+> @@ -96,6 +96,47 @@ line."\r
+> (when (notmuch-address-locate-command notmuch-address-command)\r
+> (notmuch-address-message-insinuate))\r
+> \r
+> +;; functions to add sender / recipients to BBDB\r
+> +\r
+> +(defun notmuch-bbdb/snarf-headers (headers)\r
+> + ;; Helper function to avoid code duplication in the two below\r
+> + ;; headers should have the same format as bbdb-get-addresses-headers\r
+> +\r
+> + ;; bbdb-get-addresses reads these\r
+> + ;; Ugh, pass-by-global\r
+> + (let ((addrs (bbdb-get-addresses nil nil 'notmuch-bbdb/get-header-content))\r
+> + (bbdb-get-addresses-headers headers) ; headers to read\r
+> + (bbdb-gag-messages t)) ; suppress m/n processed message)\r
+> + (bbdb-update-records addrs t t)))\r
+> +\r
+> +(defun notmuch-bbdb/snarf-from ()\r
+> + "Import the sender of the current message into BBDB"\r
+> + (interactive)\r
+> + (notmuch-bbdb/snarf-headers\r
+> + (list (assoc 'authors bbdb-get-addresses-headers))))\r
+> +\r
+> +(defun notmuch-bbdb/snarf-to ()\r
+> + "Import all recipients of the current message into BBDB"\r
+> + (interactive)\r
+> + (notmuch-bbdb/snarf-headers\r
+> + (list (assoc 'recipients bbdb-get-addresses-headers))))\r
+> +\r
+> +(defvar notmuch-bbdb/header-by-name\r
+> + ;; both are case sensitive\r
+> + '( ("From" . :From)\r
+> + ("To" . :To)\r
+> + ("CC" . :Cc)\r
+> + ("BCC" . :Bcc)\r
+> + ("Resent-From" . nil)\r
+> + ("Reply-To" . nil)\r
+> + ("Resent-To" . nil)\r
+> + ("Resent-CC" . nil))\r
+> + "Alist for dispatching header symbols as used by notmuch-show-get-header\r
+> +from strings as used by bbdb-get-addresses")\r
+> +\r
+> +(defun notmuch-bbdb/get-header-content (name)\r
+> + (notmuch-show-get-header (cdr (assoc name notmuch-bbdb/header-by-name))))\r
+> +\r
+> ;;\r
+> \r
+> (provide 'notmuch-address)\r
+> -- \r
+> 1.8.2.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r