From: Tomi Ollila Date: Sat, 20 Oct 2012 09:14:20 +0000 (+0300) Subject: Re: [PATCH] emacs: functions to import sender or recipient into BBDB X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1202e510cb959cbbc2e1c2d1947de796459330f9;p=notmuch-archives.git Re: [PATCH] emacs: functions to import sender or recipient into BBDB --- diff --git a/90/ee918c7628022035f1fcd81ab4609e9f4a4cb2 b/90/ee918c7628022035f1fcd81ab4609e9f4a4cb2 new file mode 100644 index 000000000..8677cb58e --- /dev/null +++ b/90/ee918c7628022035f1fcd81ab4609e9f4a4cb2 @@ -0,0 +1,98 @@ +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 90104431FB6 + for ; Sat, 20 Oct 2012 02:14:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 WZdtoh3gFw3L for ; + Sat, 20 Oct 2012 02:14:19 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8DCB6431FAE + for ; Sat, 20 Oct 2012 02:14:19 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 243A81000E5; + Sat, 20 Oct 2012 12:14:21 +0300 (EEST) +From: Tomi Ollila +To: Daniel Bergey , + Notmuch Mail List +Subject: Re: [PATCH] emacs: functions to import sender or recipient into BBDB +In-Reply-To: <87ipa66pne.fsf@betacantrips.com> +References: <87lii62sk2.fsf@wonderlust.lan> <87ipa66pne.fsf@betacantrips.com> +User-Agent: Notmuch/0.14+51~g62cd13b (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +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: Sat, 20 Oct 2012 09:14:20 -0000 + +On Sat, Oct 20 2012, Ethan Glasser-Camp wrote: + +> Daniel Bergey writes: +> +>> From a show buffer, bbdb/notmuch-snarf-from imports the sender into +>> bbdb. bbdb/notmuch-snarf-to attempts to import all recipients. BBDB +>> displays a buffer with each contact; C-g displays the next contact, or +>> returns to the notmuch-show buffer. +>> +>> This is my first notmuch patch. Comments very welcome. +> +> Hi! +> +>> emacs/notmuch-show.el | 28 ++++++++++++++++++++++++++++ +> +> I don't think this belongs in notmuch-show. My first inclination is that +> this should go into a new file contrib/notmuch-bbdb.el (assuming there's +> no other notmuch-bbdb integration stuff floating around). +> +>> 1 file changed, 28 insertions(+) +>> +>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +>> index 6335d45..3bc1da0 100644 +>> --- a/emacs/notmuch-show.el +>> +++ b/emacs/notmuch-show.el +>> @@ -1895,6 +1895,34 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')." +>> (button-get button :notmuch-filename) +>> (button-get button :notmuch-content-type))))))) +>> +>> +;; bbdb interaction functions, awaiting user keybindings +>> + +>> +(defun bbdb/snarf-between-commas () +>> + ; What about names written "Surname, First M" ? +> +> Most comments in emacslisp start with two semicolons. + +3 quick comments. + +I was thinking notmuch-bbdb.el but contrib/notmuch-bbdb.el could be +good start. + +then functions like notmuch-bbdb/snarf-between-commas etc... + +and yes, ;; comments -- that also keeps indent-region happy. + +Tomi +