Alex Schroeder <[EMAIL PROTECTED]> writes:
> I propose the following documentation for the zip code related stuff
> in BBDB, and the transformation of some defvars into defcustom.
[...]
> +@cindex Address display
> +Controls the display of addresses in the buffer. Each entry in this
> +list consists of an identifying function and a formatting function.
> +The identifying function must accept an address and return @code{t} if
> +the associated formatting function is to be used. The formatting
> +function must insert the formatted address in the current buffer.
> +Identifying functions usually base their decision on the zip code
> +format or on the country name. The default entries will format an
> +address using continental style if the zip code matches
> +@code{bbdb-continental-zip-regexp}. If the zip code does not match,
> +addresses are formatted in US style.
Basically, a continental zip code is displayed in front of the city
while a US zip code comes after. That is about the only difference,
right?
May I suggest a change in the regular expression that determines
whether a zip code is US or continental? As I understand it, right now
continental zip codes are recognized by the existence of their country
prefix, like "SE" in "SE-133 36". However, that prefix is only used
when sending mail to Sweden from abroad, so for mail sent from
somewhere Sweden to a Swedish address, you would skip it and only
write, say, "133 36". So for Swedish addresses in a Swedish BBDB
database it makes sense to store and display Swedish zip codes without
the prefix. I would guess this goes for other European countries as
well but I don't really know.
Anyway, at least for Swedish zip codes it holds that they should
always be written with a space between the third and fourth digits,
while US zip codes do never contain spaces (I believe?). I believe
(but I don't know for sure) some other European countries also have
spaces in their zip codes. Anyway, it would be safe to recognize zip
codes matching something like "[0-9]+ [0-9]+" as also being
continental, even if there is no country prefix.
Another thought is, in the absence of zip code country prefix, to look
at the country field. If it is a European country it should be
displayed as a continental address. But then one would need a list of
countries so that might not be a good idea.
--
Mats Löfdahl + Voice: +46 8 16 44 80
Royal Swedish Academy of Sciences + Fax: +46 8 16 42 28
Stockholm Observatory + [EMAIL PROTECTED]
SE-133 36 Saltsjöbaden, Sweden + [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/