On Monday, December 3, 2007 at 02:14:01, Leo wrote:
> On 2007-11-26 22:57 +0000, Robert Widhopf-Fenk wrote:
> 
> Hi Robert, sorry for the delay.
> 
> > On Saturday, November 24, 2007 at 00:24:28, Leo wrote:
> >> Hi there,
> >> 
> >> In England, one usually needs to prefix the name with a title
> >> such as Prof. Stupid Head. If I miss the title "Prof.", Stupid
> >> Head usually thinks that I am rude.
> >
> > What is he using in the From header?
> >
> > Is it also like that if you miss it in the email address,
> > i.e. the To/CC headers?
> 
> I don't quite understand this question. He uses "Prof. ..."

I just try to understand how it would impact on snarfing,
i.e. how to detect the title and avoid name miss matches.

This is not solved by the patch below.

> >> So I have tried to add the title to the name field. However, now
> >> in mail mode there is no completion for "Stupid <TAB>" and adding
> >> the title to name field is logically incorrect.
> >
> > Complete on "Prof Stupid" and it should work.
> 
> But prof is not part of the name besides once you collect many
> entries with prof the completion would have too many entries
> beginning with prof.
> 
> >
> > Anyway, adding support for a title sounds reasonable, but it
> > will/might interfere during name comparison and I wonder how to
> > extract / detect them correctly.
> 
> Many be we can add a field for honorific Prefixes and have
> bbdb-complete-name insert that value in front of the Name when
> completing in message mode etc.
> 
> What do you think?
> 
> I try to hack bbdb-complete-name to do that, but that function is
> too complicated for me.

Never touch this beast, also it is the wrong place,
bbdb-dwim-net-address is the right one, see below ...

> >> In vCard, the N type has Family Name, Given Name, Additional
> >> Names, Honorific Prefixes, and Honorific Suffixes. I can not
> >> think of a name that can not be expressed in that format.
> >
> > You can add what ever fields you like (C-o NEWFIELD RET),
> > e.g. also those, but ... 
> 
> I knew about this for a while ;)
> 
> >> I wonder if we can extend bbdb to support that.
> >
> > ... I wonder what functionality you would want to bind to
> > them.
> >
> >> BTW, more and more I find bbdb can not record some info
> >> correctly. For example some contacts have work and personal 'www'
> >> and there is no easy way to indicate this in bbdb.
> >
> > Add a new field www-home. 
> 
> www-home can do but looks ugly.

So what looks "cute"?

Do you want the www field to be an associative list?

How would it look like?

Robert.

Please test this patch for adding titles to expanded nets
...

=== modified file 'lisp/bbdb-com.el'
--- lisp/bbdb-com.el    2007-11-26 22:33:04 +0000
+++ lisp/bbdb-com.el    2007-12-03 20:23:52 +0000
@@ -1879,6 +1879,7 @@
   (or net (error "record unhas network addresses"))
   (let* ((override (bbdb-record-getprop record 'mail-name))
          (name (or override (bbdb-record-name record)))
+         title
          fn ln (i 0))
     (if override
         (let ((both (bbdb-divide-name override)))
@@ -1887,7 +1888,9 @@
           (if (equal fn "") (setq fn nil))
           (if (equal ln "") (setq ln nil)))
       (setq fn (bbdb-record-firstname record)
-            ln (bbdb-record-lastname record)))
+            ln (bbdb-record-lastname record))
+      (if (setq title (bbdb-record-getprop record 'title))
+          (setq name (concat title " " name))))
     ;; if the name contains backslashes or double-quotes, backslash them.
     (if name
         (while (setq i (string-match "[\\\"]" name i))


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to