Re: bbdb-complete-name return value

2011-02-06 Thread Antoine Levitt
Hi, thanks for looking into it!
06/02/11 17:45, Roland Winkler
 On Fri Feb 4 2011 Antoine Levitt wrote:
 I've got an issue with the bbdb-complete-name function. 

 It seems you are using BBDB 2.xx.  Recently BBDB has been upgraded
 significantly.  You might want to try BBDB 3 which is avaiable at
 http://cvs.savannah.gnu.org/viewvc/bbdb/?root=bbdb
 To check it out, use
 cvs -d:pserver:anonym...@cvs.sv.gnu.org:/sources/bbdb co bbdb

Ah, thanks! I tried using the sourceforge CVS, but it was down. Anyway,
I just updated to latest CVS (bbdb-version: BBDB version 3.02 ($Date:
2011/01/16 18:03:33 $)), and the problem is still the same.


 When using another completion in message mode, such as
 
 (setq message-tab-body-function (lambda () (interactive) (dabbrev-expand
 nil)))
 
 , a successful BBDB completion also triggers the dabbrev-expand
 completion.

 I am not sure I understand your problem.  (I am not using
 message-mode myself.)

The way message, as insinuated by bbdb, works, is that it calls bbdb
first, and then if the return value is nil, calls
message-tab-body-function : see message-tab and message-expand-name.

Therefore, message depends on the return value of
bbdb-complete-name. Without going into the details of message, simply
type Bo and eval (bbdb-complete-name) in a buffer. If it completes to
a single name, it returns nil, which is not the behaviour relied upon by
message (and possibly other MUAs).

Antoine

--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-complete-name return value

2011-02-06 Thread Roland Winkler
On Sun Feb 6 2011 Antoine Levitt wrote:
  When using another completion in message mode, such as
  
  (setq message-tab-body-function (lambda () (interactive) (dabbrev-expand
  nil)))
  
  , a successful BBDB completion also triggers the dabbrev-expand
  completion.
 
  I am not sure I understand your problem.  (I am not using
  message-mode myself.)
 
 The way message, as insinuated by bbdb, works, is that it calls bbdb
 first, and then if the return value is nil, calls
 message-tab-body-function : see message-tab and message-expand-name.
 
 Therefore, message depends on the return value of
 bbdb-complete-name. Without going into the details of message, simply
 type Bo and eval (bbdb-complete-name) in a buffer. If it completes to
 a single name, it returns nil, which is not the behaviour relied upon by
 message (and possibly other MUAs).

I see! It seems we have here another example that other code has
evolved, but BBDB is still behaving in some kind of old-fashioned way.

Currently bbdb-complete-mail (the new name of bbdb-complete-name)
really has no well-defined return values whatsoever. Would it help
if it returned non-nil whenever it had done something?  Would this
be the right thing??

Possibly, we should continue this discussion on some other list,

Roland

--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/