From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62908 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: New completion mode Date: Tue, 18 Apr 2006 15:46:52 +0200 Message-ID: <871wvv2dyr.fsf@latte.josefsson.org> References: <86irpe1a4h.fsf@student.uni-magdeburg.de> <9e8xq98jru.fsf@gowron.rz-berlin.mpg.de> <87k69n2kve.fsf@latte.josefsson.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145368063 11522 80.91.229.2 (18 Apr 2006 13:47:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2006 13:47:43 +0000 (UTC) Original-X-From: ding-owner+m11435@lists.math.uh.edu Tue Apr 18 15:47:42 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVqY0-0006gN-QA for ding-account@gmane.org; Tue, 18 Apr 2006 15:47:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FVqXv-0004cA-00; Tue, 18 Apr 2006 08:47:11 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FVqXl-0004c5-00 for ding@lists.math.uh.edu; Tue, 18 Apr 2006 08:47:01 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FVqXh-0005TF-L2 for ding@lists.math.uh.edu; Tue, 18 Apr 2006 08:47:00 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FVqXg-00027L-00 for ; Tue, 18 Apr 2006 15:46:56 +0200 Original-Received: from localhost.localdomain (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3IDkrh0004190 for ; Tue, 18 Apr 2006 15:46:53 +0200 Original-To: ding@gnus.org OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:22:060418:ding@gnus.org::r11fpSbkz9zOwvHc:0mxA In-Reply-To: (Reiner Steib's message of "Tue, 18 Apr 2006 15:04:38 +0200") User-Agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62908 Archived-At: Reiner Steib writes: > On Tue, Apr 18 2006, Simon Josefsson wrote: > >> Wishlist: import all bbdb addresses automatically? Below is the >> format of my ~/.bbdb. I have no idea why the many parenthesis, and >> how older file-version formats look like. > > I don't have these parenthesis in my.bbdb file: > > ;;; file-version: 6 > ;;; user-fields: (birthday www category expire gnokii) > > ["Lars Magne" "Ingebrigtsen" ("Lars M. Ingebrigtsen" "Lars Ingebrigtsen") nil nil nil ("larsi@gnus.org" "bugs@gnus.org" "lmi@gnus.org") ((creation-date . "2003-04-30") (timestamp . "2005-12-18")) nil] > > > But instead of parsing the .bbdb file on your own, you should better > use BBDB functions, I think. This expression returns a list of all > addresses: > > (let ((records (bbdb-records)) > nets) > (dolist (i records) > (dolist (n (bbdb-record-net i)) > (push n nets))) > nets) This assume the user still has bbdb installed... which might be good enough. If (require 'bbdb) fails, though, and ~/.bbdb exists, I wonder whether it maybe should read it anyway. On second thought, it may be simpler to not do anything automatically, but simply provide a bbdb->ecomplete synching as a separate function, possibly even in a separate file (to avoid polluting ecomplete.el with bbdb stuff). I like how ecomplete seem to get along nicely with bbdb. There's no reason for them to compete, they can complement each other. Although eventually, I would like Gnus to have bbdb's functionality built-in. Or even a fraction of it, I only use auto-completing from it. It is quite annoying to have to install bbdb separately.