Emacs, BBDB, and getting your contacts on the Android or iPhone

Want your Emacs BBDB contacts on your Android or iPhone?

The easiest way I’ve found is to export your contacts to CSV, then import them into something like Google Contacts. You can export your BBDB contacts using bbdb-to-outlook.el, which is available in the BBDB package in the bits/ directory. Download bbdb-to-outlook.el from Sourceforge if you can’t find it in your BBDB directory. To use:

  1. Load bbdb-to-outlook.el and use M-x eval-buffer to load the code.
  2. Use M-x bbdb to open your BBDB records, and search for . to show all the records. Alternatively, search for a subset of your records.
  3. Type O to run bbdb-to-outlook and choose the file.

Tada! Step one done. Review the file and delete anything you don’t want to include.

To import the contacts into Google Contacts, go to Google Mail and click on Contacts. Click on Import and choose your file. After some time and some fiddling, you can get that synchronized onto your Android or iPhone.

I haven’t thought about syncing, but I’m trying to keep my BBDB as The Master File for Contacts anyway, as it’s so much more flexible than any other contact database I’ve tried. (Although gist.com is pretty cool and I do like the Android’s merging of photos, contact info, and updates…)

There was some work on synchronizing BBDB with the Palm, so that might be a possibility.


4 Pingbacks/Trackbacks

  • igor

    It seems that there is a library which can keep contacts in google and bbdb synced: http://code.google.com/p/emacs-google/wiki/googlecontacts

  • Aha! Even better. =) Thanks for sharing!

  • I came up with an interesting question (maybe not, but I found it intriguing). What is more useful: importing into BBDB or exporting from it? I guess the answer depends on what have you been using more often. For me it is importing into, for you (and everyone who used BBDB for a long time, I guess!) it is exporting from.

    I started using BBDB last month (emacs 30 day challenge: a glimpse of BBDB and gnus), and sincerely, I’ve found it quite good… But all my contacts are either in my Mac Address Book/Google Contacts (the former more than the latter). I considered heavily doing a import-export combination (as someone suggested quite easy ways to do so in a comment in HackerNews), but I have ended just adding contacts as I reply to them in gnus. This way I keep my bbdb as my main database (sitting in the warm cloud of Dropbox, to sync between my Mac and my Linux machine), and most important, clean. Without all those contacts I never cared to purge from the other databases.



  • Ruben: Check out my notes on importing in case you change your mind. =)

  • Thanks, maybe I’ll do it if I decide to do some Google contact purging first!



  • drolive

    BTW, does anyone know if Emacs can handle two bbdb files instead of just one, e.g., to split personal and professional contacts?

  • Hi all,

    I am the guy behind the http://code.google.com/p/emacs-google/wiki/googlecontacts . I was checking Google analytics for this website, and most part of access were from this website. Thanks Igor and Sacha.
    In the beginning I was doing that for myself, but I believe it can be useful to other people. So let me know if you have any suggestion.


  • drolive: I’ve never tried it, but if you do have them in one file, you could use mail aliases to differentiate them, and then filter by mail aliases. Hope that helps!

  • Ian Dobbie

    Syncing between a palm and BBDB with SyncBBDB works brilliantly. Until my palm died
    I used this all the time. Now I have an iPhone so I have to work out how to sync the two :-(.


    • I think I imported into Google Contacts and that worked for me. =)

  • For the benefit of anyone else searching the Internet, I’ll note that bbdb-to-outlook.el appears not to work with BBDB v3 (I got the error “Autoloading failed to define function bbdb-field-shown-p”).

  • Pingback: ECAE — Shopex电子商务云的梦想空间 » [Denny] Emacs — fundanmental features()

  • I came across this site while searching for sync solutions for BBDB. There were many one-way or “import” solutions or hacks, but no true bi-directional sync solutions. So I wrote my own. Take a look at the project page at http://karra-asynk.appspot.com/ it might work for you. It is a python program and released under the GNU AGPL. Further, it can also sync to Outlook, if that floats your boat :)

  • Karra: Awesome. Thanks for making that! =) I’m playing around with using org-contacts to manage my contacts instead so that I can take more structured notes, but it’s good to see activity in this space.

  • Pingback: Data Deduplication | Bills Blog()

  • Pingback: [Denny] Emacs — fundanmental features | Denny: A indie developer()

  • Pingback: Emacs — fundanmental features | Raw notes here. http://dennyzhang.com is better()