Adrian Aichner <[EMAIL PROTECTED]> writes:

> Thomas Gerds <[EMAIL PROTECTED]> writes:
>
>> I would like that `bbdb-complete-name' completes also by last
>> names. googling the topic suggested that one could add the last name
>> of each entry to the AKA field. however, the following does not seem
>> to work:
>
> Thomas, have you read the documentation of variable
> bbdb-completion-type
> and tried to change completion behavior this way?

yes! the problem is the following: I want to write an email whose bbdb
name is `Adrian Aichner' however I forgot the first name and start
writing `Aic' then press tab (which finally calls bbdb-complete-name)
since the full-name is `Adrian Aichner' the string `Aic' is not found.

I see two possible solutions:

1. modify the function bbdb-complete-name such that the hashtable
which currently is obtained by calling bbdb-hashtable is also includes
the lastnames.  2. modify the search pattern, however this would lead
to a completely different behaviour, more similar to `iswitchb'.


>
> How do you use below function?
>

I call it interactively from xemacs: M-x bbdb-last-name-to-aka RET

> (setq bbdb-complete-name-allow-cycling t) may also be useful if you
>have not done so yet.

yes, I have this variable set to non-nil

thanks for your help!

thomas


>

>
> Hope this helps!
>
> Adrian
>
>>
>> (defun bbdb-last-name-to-aka ()
>>   (interactive)
>>   (let* ((bbdb-recs  (bbdb-records))
>>       rec old-aka new-aka lastname)
>>     (while (setq rec (car bbdb-recs))
>>       (setq lastname (bbdb-record-lastname rec)
>>          old-aka (bbdb-record-aka rec))
>>       (if (or (string= lastname "" )
>>            (member lastname old-aka)) nil
>>      (setq new-aka
>>            (cons lastname old-aka))
>>      (bbdb-record-set-aka
>>       rec new-aka))
>> ; (bbdb-save-db t t)
>>       (setq bbdb-recs (cdr bbdb-recs)
>>          count (+ count 1)))))
>>
>> thanks for a solution ...
>>
>> tomy
>
> -- 
> Adrian Aichner
>  mailto:[EMAIL PROTECTED]
>  http://www.xemacs.org/
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> bbdb-info@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bbdb-info
> BBDB Home Page: http://bbdb.sourceforge.net/


--
><(((*>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to