From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [OT] Configuring bbdb 3 Date: Thu, 26 Jul 2012 11:52:21 +0800 Message-ID: <87mx2nfabu.fsf@ericabrahamsen.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuF84-0007ce-Nz for emacs-orgmode@gnu.org; Wed, 25 Jul 2012 23:52:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuF83-0001yl-O5 for emacs-orgmode@gnu.org; Wed, 25 Jul 2012 23:52:48 -0400 Received: from plane.gmane.org ([80.91.229.3]:35144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuF83-0001yd-Gu for emacs-orgmode@gnu.org; Wed, 25 Jul 2012 23:52:47 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SuF82-00050q-C0 for emacs-orgmode@gnu.org; Thu, 26 Jul 2012 05:52:46 +0200 Received: from 50-56-99-223.static.cloud-ips.com ([50.56.99.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jul 2012 05:52:46 +0200 Received: from eric by 50-56-99-223.static.cloud-ips.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Jul 2012 05:52:46 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Thu, Jul 26 2012, Alan Schmitt wrote: > Hello, > > Since I'm spending more and more time in Emacs, mostly in org mode, I > moved my email reading and writing there. Everything is happily > configured (I'm using gnus), with one exception: email address > completion. I've read a few things online and it seems that bbdb is the > way to go, so I compiled and installed bbdb 3. Unfortunately I could not > find any configuration example online (the ones I found were for bbdb 2, > but things seem to have changed a lot, and the conversion guide in the > emacswiki did not help). > > I know this is off topic for this list, but if someone would be willing > to share his configuration, I would very much appreciate it. (I'm not > aiming for much: I want the addresses of messages I read to be added > automatically in bbdb, and to be able to complete from them when writing > a message.) In BBDB 3, `bbdb-complete-mail' is the function that takes the string before point and tries to turn it into something suitable for the "To" header of the message. In message-mode, with BBDB activated, TAB is bound to something that eventually calls `bbdb-complete-mail' (actually uses `bbdb-complete-name', which is deprecated and aliased to `bbdb-complete-mail'). So, depending on how you're writing your messages in org, you could bind a convenient key to `bbdb-complete-mail', or overload TAB or something else so that it checks if you're in the appropriate field, and then does `bbdb-compelete-mail'. For adding records automatically to BBDB, you say you're using gnus, but also say you've moved your email reading to org. Where are you that you'd like to automatically add the record? In gnus, I've bound ";" to `bbdb-mua-edit-field-sender', and also have this: (setq bbdb-mua-update-interactive-p '(query . create)) If I hit ";" on a message, it will show me the records for all the addresses in the To and CC headers (possibly headers too), and if I don't have records for any of those headers, it will ask me if I want to create records. That's the way I like it, you can look at the possible values for `bbdb-mua-update-interactive-p' to get different behaviors. If you're actually reading your mail in org and want to create records from there, it might be more complicated, as the BBDB creation functions seem pretty tied to you being in a MUA of some sort… Hope that's useful, Eric -- GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.11) of 2012-07-23 on pellet 7.8.10