[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 6377fb5 2/5: Add a "neighborhood" slot for address
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 6377fb5 2/5: Add a "neighborhood" slot for addresses |
Date: |
Fri, 3 Sep 2021 18:09:20 -0400 (EDT) |
branch: externals/ebdb
commit 6377fb5d3ae2deb3fc434e446d6f8d5a4a02029c
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Add a "neighborhood" slot for addresses
Not displayed by default.
* ebdb.el (ebdb-field-address): This is a common thing in some
countries.
(ebdb-read): Optionally read an address neighborhood.
---
ebdb.el | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/ebdb.el b/ebdb.el
index c6229c3..47c7f72 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1792,6 +1792,13 @@ Primary sorts before normal sorts before defunct."
:custom (repeat string)
:accessor ebdb-address-streets
:documentation "A list of strings representing the street address(es).")
+ (neighborhood
+ :initarg :neighborhood
+ :type string
+ :initform ""
+ :custom string
+ :accessor ebdb-address-neighborhood
+ :documentation "Smaller area within the locality.")
(locality
:initarg :locality
:type string
@@ -1843,6 +1850,11 @@ Primary sorts before normal sorts before defunct."
(plist-get slots :locality)
(ebdb-read-string "Town/City"
(when obj (ebdb-address-locality obj))
ebdb-locality-list)))
+ (neighborhood
+ (if (plist-member slots :neighborhood)
+ (plist-get slots :neighborhood)
+ (ebdb-read-string "Neighborhood/Suburb/Zone"
+ (when obj (ebdb-address-neighborhood obj)))))
(region
(if (plist-member slots :region)
(plist-get slots :region)
@@ -1866,6 +1878,7 @@ Primary sorts before normal sorts before defunct."
class
`(:streets ,streets
:locality ,locality
+ :neighborhood ,neighborhood
:label ,(plist-get slots :label)
:region ,region
:postcode ,postcode
@@ -1897,7 +1910,11 @@ The result looks like this:
street
...
locality, region postcode
- country."
+ country.
+
+Note that the neighborhood is not output by default, though it
+may be for certain countries, when using EBDB
+internationalization."
(let ((country (ebdb-address-country address))
(streets (ebdb-address-streets address)))
(when (symbolp country)
- [elpa] externals/ebdb updated (365cf0c -> fb13955), Eric Abrahamsen, 2021/09/03
- [elpa] externals/ebdb e6717b8 1/5: Small updates to phone number parsing, Eric Abrahamsen, 2021/09/03
- [elpa] externals/ebdb ee1b81f 3/5: New customization option ebdb-default-phone-country, Eric Abrahamsen, 2021/09/03
- [elpa] externals/ebdb 3f5dda3 4/5: Add Germany-specific phone and address display methods, Eric Abrahamsen, 2021/09/03
- [elpa] externals/ebdb 6377fb5 2/5: Add a "neighborhood" slot for addresses,
Eric Abrahamsen <=
- [elpa] externals/ebdb fb13955 5/5: Add menu item for `ebdb-edit-field-customize', do minor point release, Eric Abrahamsen, 2021/09/03