Sam Steingold <[EMAIL PROTECTED]> writes:

> > Hm, if we have bbdb-zip-canonicalize, then the old problem re-appears:
> > whenever a new format of zip codes is "discovered", somebody has to
> > update the code.  
> 
> you missed the whole point!
> 
> 1. canonicalization can be turned off at any time
> 2. canonicalization can be user-supplied
> 3. if canonicalization fails, the string is used as is

I don't think it's nice to start off with "you missed the whole
point!"

What I'm trying to say is this:

Formatting the entire address on the output side can be done by adding
more stuff to `bbdb-address-formatting-alist' and
`bbdb-address-print-formatting-alist'.  Canonicalization of the zip
code can be part of this without writing new code.

Therefore I claim point 2 has already been taken care of, unless you
want to (optionally) add canonicalization on the input side.  I think
the best idea would be to use a list-of-regexps that can be customized
by users.  Keeping the current code as a means to do canonicalization
on the input side is hard to customize.

If you use the "plain string zip codes" patch, then using the default
output functions the string is used as is (solving point 1 and 3).  If
anybody writes their own output functions which canonicalize the zip
codes, then using the strings as-is or respecting user-variables is up
to the author of the output functions.

I prefer the "plain string zip codes" patch to adding strings as a new
zip code datastructure, because it simplifies the code.  The "plain
string zip codes" patch already has migrations functions that work.

I think simplification of the code is a good thing to do, because it
makes life easier for people writing output functions for
`bbdb-address-formatting-alist' and
`bbdb-address-print-formatting-alist'.  Besides, the formats I wrote
(Continental, Japanese and Brazilian) all relied on
bbdb-address-zip-string anyway.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html


_______________________________________________
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info

Reply via email to