[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 5fbc902 343/350: New option ebdb-i18n-countries-pr
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 5fbc902 343/350: New option ebdb-i18n-countries-pref-scripts |
Date: |
Mon, 14 Aug 2017 11:47:07 -0400 (EDT) |
branch: externals/ebdb
commit 5fbc9020840465efa45472eddf9cfd59283d0670
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New option ebdb-i18n-countries-pref-scripts
* ebdb-i18n.el (ebdb-i18n-countries-pref-scripts): New option, an
alist that mirrors ebdb-i18n-countries, with country names in an
alternate/preferred script. Meant to allow selection/display of
country names in their native script.
(ebdb-read): Use both variables for completing read.
* ebdb.el (ebdb-format-address-default): Use both variables for
display.
(ebdb-format-address): Use both variables for display.
* ebdb.org: Mention in manual.
---
ebdb-i18n.el | 552 +++++++++++++++++++++++++++++++----------------------------
ebdb.el | 13 +-
ebdb.info | 127 ++++++++------
ebdb.org | 49 +++---
ebdb.texi | 32 +++-
5 files changed, 417 insertions(+), 356 deletions(-)
diff --git a/ebdb-i18n.el b/ebdb-i18n.el
index b1d9ae3..251a92b 100644
--- a/ebdb-i18n.el
+++ b/ebdb-i18n.el
@@ -53,269 +53,284 @@
:type 'list
:group 'ebdb-i18n)
+(defcustom ebdb-i18n-countries-pref-scripts nil
+ "An alist equivalent to `ebdb-i18n-countries', but in alternate scripts.
+Ie, each alist element is a cons of a country name, in a
+non-English script, plus the same three-letter symbol as found in
+`ebdb-i18n-countries'. This is meant to allow country names to
+be listed in the country's own script, but the name can be given
+in any script the user prefers.
+
+Any country name listed here will be offered along with the
+English version for completion, and will be preferred over the
+English version for display."
+
+ :type 'list
+ :group 'ebdb-i18n)
+
;; defvars come first to pacify compiler.
;; Taken from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3, on Feb
;; 27, 2016
(defvar ebdb-i18n-countries
'(
- ("Afghanistan" . afg)
- ("Åland Islands" . ala)
- ("Albania" . alb)
- ("Algeria" . dza)
- ("American Samoa" . asm)
- ("Andorra" . and)
- ("Angola" . ago)
- ("Anguilla" . aia)
- ("Antarctica" . ata)
- ("Antigua and Barbuda" . atg)
- ("Argentina" . arg)
- ("Armenia" . arm)
- ("Aruba" . abw)
- ("Australia" . aus)
- ("Austria" . aut)
- ("Azerbaijan" . aze)
- ("Bahamas" . bhs)
- ("Bahrain" . bhr)
- ("Bangladesh" . bgd)
- ("Barbados" . brb)
- ("Belarus" . blr)
- ("Belgium" . bel)
- ("Belize" . blz)
- ("Benin" . ben)
- ("Bermuda" . bmu)
- ("Bhutan" . btn)
- ("Bolivia" . bol)
- ("Bonaire" . bes)
- ("Sint Eustatius" . bes)
- ("Saba" . bes)
- ("Bosnia and Herzegovina" . bih)
- ("Botswana" . bwa)
- ("Bouvet Island" . bvt)
- ("Brazil" . bra)
- ("British Indian Ocean Territory" . iot)
- ("Brunei Darussalam" . brn)
- ("Bulgaria" . bgr)
- ("Burkina Faso" . bfa)
- ("Burundi" . bdi)
- ("Cabo Verde" . cpv)
- ("Cambodia" . khm)
- ("Cameroon" . cmr)
- ("Canada" . can)
- ("Cayman Islands" . cym)
- ("Central African Republic" . caf)
- ("Chad" . tcd)
- ("Chile" . chl)
- ("China" . chn)
- ("Christmas Island" . cxr)
- ("Cocos (Keeling) Islands" . cck)
- ("Colombia" . col)
- ("Comoros" . com)
- ("Congo" . cog)
- ("Congo" . cod)
- ("Cook Islands" . cok)
- ("Costa Rica" . cri)
- ("Côte d'Ivoire" . civ)
- ("Croatia" . hrv)
- ("Cuba" . cub)
- ("Curaçao" . cuw)
- ("Cyprus" . cyp)
- ("Czech Republic" . cze)
- ("Denmark" . dnk)
- ("Djibouti" . dji)
- ("Dominica" . dma)
- ("Dominican Republic" . dom)
- ("Ecuador" . ecu)
- ("Egypt" . egy)
- ("El Salvador" . slv)
- ("Emacs" . emc)
- ("Equatorial Guinea" . gnq)
- ("Eritrea" . eri)
- ("Estonia" . est)
- ("Ethiopia" . eth)
- ("Falkland Islands" . flk)
- ("Faroe Islands" . fro)
- ("Fiji" . fji)
- ("Finland" . fin)
- ("France" . fra)
- ("French Guiana" . guf)
- ("French Polynesia" . pyf)
- ("French Southern Territories" . atf)
- ("Gabon" . gab)
- ("Gambia" . gmb)
- ("Georgia" . geo)
- ("Germany" . deu)
- ("Ghana" . gha)
- ("Gibraltar" . gib)
- ("Greece" . grc)
- ("Greenland" . grl)
- ("Grenada" . grd)
- ("Guadeloupe" . glp)
- ("Guam" . gum)
- ("Guatemala" . gtm)
- ("Guernsey" . ggy)
- ("Guinea" . gin)
- ("Guinea-Bissau" . gnb)
- ("Guyana" . guy)
- ("Haiti" . hti)
- ("Heard Island and McDonald Islands" . hmd)
- ("Holy See" . vat)
- ("Honduras" . hnd)
- ("Hong Kong" . hkg)
- ("Hungary" . hun)
- ("Iceland" . isl)
- ("India" . ind)
- ("Indonesia" . idn)
- ("Iran" . irn)
- ("Iraq" . irq)
- ("Ireland" . irl)
- ("Isle of Man" . imn)
- ("Israel" . isr)
- ("Italy" . ita)
- ("Jamaica" . jam)
- ("Japan" . jpn)
- ("Jersey" . jey)
- ("Jordan" . jor)
- ("Kazakhstan" . kaz)
- ("Kenya" . ken)
- ("Kiribati" . kir)
- ("North Korea" . prk)
- ("South Korea" . kor)
- ("Kuwait" . kwt)
- ("Kyrgyzstan" . kgz)
- ("Laos" . lao)
- ("Lao People's Democratic Republic" . lao)
- ("Latvia" . lva)
- ("Lebanon" . lbn)
- ("Lesotho" . lso)
- ("Liberia" . lbr)
- ("Libya" . lby)
- ("Liechtenstein" . lie)
- ("Lithuania" . ltu)
- ("Luxembourg" . lux)
- ("Macao" . mac)
- ("Macedonia" . mkd)
- ("Madagascar" . mdg)
- ("Malawi" . mwi)
- ("Malaysia" . mys)
- ("Maldives" . mdv)
- ("Mali" . mli)
- ("Malta" . mlt)
- ("Marshall Islands" . mhl)
- ("Martinique" . mtq)
- ("Mauritania" . mrt)
- ("Mauritius" . mus)
- ("Mayotte" . myt)
- ("Mexico" . mex)
- ("Micronesia" . fsm)
- ("Moldova" . mda)
- ("Monaco" . mco)
- ("Mongolia" . mng)
- ("Montenegro" . mne)
- ("Montserrat" . msr)
- ("Morocco" . mar)
- ("Mozambique" . moz)
- ("Myanmar" . mmr)
- ("Namibia" . nam)
- ("Nauru" . nru)
- ("Nepal" . npl)
- ("Netherlands" . nld)
- ("New Caledonia" . ncl)
- ("New Zealand" . nzl)
- ("Nicaragua" . nic)
- ("Niger" . ner)
- ("Nigeria" . nga)
- ("Niue" . niu)
- ("Norfolk Island" . nfk)
- ("Northern Mariana Islands" . mnp)
- ("Norway" . nor)
- ("Oman" . omn)
- ("Pakistan" . pak)
- ("Palau" . plw)
- ("Palestine" . pse)
- ("Panama" . pan)
- ("Papua New Guinea" . png)
- ("Paraguay" . pry)
- ("Peru" . per)
- ("Philippines" . phl)
- ("Pitcairn" . pcn)
- ("Poland" . pol)
- ("Portugal" . prt)
- ("Puerto Rico" . pri)
- ("Qatar" . qat)
- ("Réunion" . reu)
- ("Romania" . rou)
- ("Russian Federation" . rus)
- ("Rwanda" . rwa)
- ("Saint Barthélemy" . blm)
- ("Saint Helena, Ascension and Tristan da Cunha" . shn)
- ("Saint Kitts and Nevis" . kna)
- ("Saint Lucia" . lca)
- ("Saint Martin" . maf)
- ("Saint Pierre and Miquelon" . spm)
- ("Saint Vincent and the Grenadines" . vct)
- ("Samoa" . wsm)
- ("San Marino" . smr)
- ("Sao Tome and Principe" . stp)
- ("Saudi Arabia" . sau)
- ("Senegal" . sen)
- ("Serbia" . srb)
- ("Seychelles" . syc)
- ("Sierra Leone" . sle)
- ("Singapore" . sgp)
- ("Sint Maarten" . sxm)
- ("Slovakia" . svk)
- ("Slovenia" . svn)
- ("Solomon Islands" . slb)
- ("Somalia" . som)
- ("South Africa" . zaf)
- ("South Georgia" . sgs)
- ("South Georgia and the South Sandwich Islands" . sgs)
- ("South Sudan" . ssd)
- ("Spain" . esp)
- ("Sri Lanka" . lka)
- ("Sudan" . sdn)
- ("Suriname" . sur)
- ("Svalbard and Jan Mayen" . sjm)
- ("Swaziland" . swz)
- ("Sweden" . swe)
- ("Switzerland" . che)
- ("Syrian Arab Republic" . syr)
- ("Taiwan" . twn)
- ("Tajikistan" . tjk)
- ("Tanzania" . tza)
- ("Thailand" . tha)
- ("Timor-Leste" . tls)
- ("Togo" . tgo)
- ("Tokelau" . tkl)
- ("Tonga" . ton)
- ("Trinidad and Tobago" . tto)
- ("Tunisia" . tun)
- ("Turkey" . tur)
- ("Turkmenistan" . tkm)
- ("Turks and Caicos Islands" . tca)
- ("Tuvalu" . tuv)
- ("Uganda" . uga)
- ("Ukraine" . ukr)
- ("UAE" . are)
- ("United Arab Emirates" . are)
- ("UK" . gbr)
- ("United Kingdom of Great Britain and Northern Ireland" . gbr)
- ("USA" . usa)
- ("United States of America" . usa)
- ("United States Minor Outlying Islands" . umi)
- ("Uruguay" . ury)
- ("Uzbekistan" . uzb)
- ("Vanuatu" . vut)
- ("Venezuela" . ven)
- ("Viet Nam" . vnm)
- ("Virgin Islands (British)" . vgb)
- ("Virgin Islands (U.S.)" . vir)
- ("Wallis and Futuna" . wlf)
- ("Western Sahara" . esh)
- ("Yemen" . yem)
- ("Zambia" . zmb)
- ("Zimbabwe" . zwe))
+("Afghanistan" . afg)
+("Åland Islands" . ala)
+("Albania" . alb)
+("Algeria" . dza)
+("American Samoa" . asm)
+("Andorra" . and)
+("Angola" . ago)
+("Anguilla" . aia)
+("Antarctica" . ata)
+("Antigua and Barbuda" . atg)
+("Argentina" . arg)
+("Armenia" . arm)
+("Aruba" . abw)
+("Australia" . aus)
+("Austria" . aut)
+("Azerbaijan" . aze)
+("Bahamas" . bhs)
+("Bahrain" . bhr)
+("Bangladesh" . bgd)
+("Barbados" . brb)
+("Belarus" . blr)
+("Belgium" . bel)
+("Belize" . blz)
+("Benin" . ben)
+("Bermuda" . bmu)
+("Bhutan" . btn)
+("Bolivia" . bol)
+("Bonaire" . bes)
+("Sint Eustatius" . bes)
+("Saba" . bes)
+("Bosnia and Herzegovina" . bih)
+("Botswana" . bwa)
+("Bouvet Island" . bvt)
+("Brazil" . bra)
+("British Indian Ocean Territory" . iot)
+("Brunei Darussalam" . brn)
+("Bulgaria" . bgr)
+("Burkina Faso" . bfa)
+("Burundi" . bdi)
+("Cabo Verde" . cpv)
+("Cambodia" . khm)
+("Cameroon" . cmr)
+("Canada" . can)
+("Cayman Islands" . cym)
+("Central African Republic" . caf)
+("Chad" . tcd)
+("Chile" . chl)
+("China" . chn)
+("Christmas Island" . cxr)
+("Cocos (Keeling) Islands" . cck)
+("Colombia" . col)
+("Comoros" . com)
+("Congo" . cog)
+("Congo" . cod)
+("Cook Islands" . cok)
+("Costa Rica" . cri)
+("Côte d'Ivoire" . civ)
+("Croatia" . hrv)
+("Cuba" . cub)
+("Curaçao" . cuw)
+("Cyprus" . cyp)
+("Czech Republic" . cze)
+("Denmark" . dnk)
+("Djibouti" . dji)
+("Dominica" . dma)
+("Dominican Republic" . dom)
+("Ecuador" . ecu)
+("Egypt" . egy)
+("El Salvador" . slv)
+("Emacs" . emc)
+("Equatorial Guinea" . gnq)
+("Eritrea" . eri)
+("Estonia" . est)
+("Ethiopia" . eth)
+("Falkland Islands" . flk)
+("Faroe Islands" . fro)
+("Fiji" . fji)
+("Finland" . fin)
+("France" . fra)
+("French Guiana" . guf)
+("French Polynesia" . pyf)
+("French Southern Territories" . atf)
+("Gabon" . gab)
+("Gambia" . gmb)
+("Georgia" . geo)
+("Germany" . deu)
+("Ghana" . gha)
+("Gibraltar" . gib)
+("Greece" . grc)
+("Greenland" . grl)
+("Grenada" . grd)
+("Guadeloupe" . glp)
+("Guam" . gum)
+("Guatemala" . gtm)
+("Guernsey" . ggy)
+("Guinea" . gin)
+("Guinea-Bissau" . gnb)
+("Guyana" . guy)
+("Haiti" . hti)
+("Heard Island and McDonald Islands" . hmd)
+("Holy See" . vat)
+("Honduras" . hnd)
+("Hong Kong" . hkg)
+("Hungary" . hun)
+("Iceland" . isl)
+("India" . ind)
+("Indonesia" . idn)
+("Iran" . irn)
+("Iraq" . irq)
+("Ireland" . irl)
+("Isle of Man" . imn)
+("Israel" . isr)
+("Italy" . ita)
+("Jamaica" . jam)
+("Japan" . jpn)
+("Jersey" . jey)
+("Jordan" . jor)
+("Kazakhstan" . kaz)
+("Kenya" . ken)
+("Kiribati" . kir)
+("North Korea" . prk)
+("South Korea" . kor)
+("Kuwait" . kwt)
+("Kyrgyzstan" . kgz)
+("Laos" . lao)
+("Lao People's Democratic Republic" . lao)
+("Latvia" . lva)
+("Lebanon" . lbn)
+("Lesotho" . lso)
+("Liberia" . lbr)
+("Libya" . lby)
+("Liechtenstein" . lie)
+("Lithuania" . ltu)
+("Luxembourg" . lux)
+("Macao" . mac)
+("Macedonia" . mkd)
+("Madagascar" . mdg)
+("Malawi" . mwi)
+("Malaysia" . mys)
+("Maldives" . mdv)
+("Mali" . mli)
+("Malta" . mlt)
+("Marshall Islands" . mhl)
+("Martinique" . mtq)
+("Mauritania" . mrt)
+("Mauritius" . mus)
+("Mayotte" . myt)
+("Mexico" . mex)
+("Micronesia" . fsm)
+("Moldova" . mda)
+("Monaco" . mco)
+("Mongolia" . mng)
+("Montenegro" . mne)
+("Montserrat" . msr)
+("Morocco" . mar)
+("Mozambique" . moz)
+("Myanmar" . mmr)
+("Namibia" . nam)
+("Nauru" . nru)
+("Nepal" . npl)
+("Netherlands" . nld)
+("New Caledonia" . ncl)
+("New Zealand" . nzl)
+("Nicaragua" . nic)
+("Niger" . ner)
+("Nigeria" . nga)
+("Niue" . niu)
+("Norfolk Island" . nfk)
+("Northern Mariana Islands" . mnp)
+("Norway" . nor)
+("Oman" . omn)
+("Pakistan" . pak)
+("Palau" . plw)
+("Palestine" . pse)
+("Panama" . pan)
+("Papua New Guinea" . png)
+("Paraguay" . pry)
+("Peru" . per)
+("Philippines" . phl)
+("Pitcairn" . pcn)
+("Poland" . pol)
+("Portugal" . prt)
+("Puerto Rico" . pri)
+("Qatar" . qat)
+("Réunion" . reu)
+("Romania" . rou)
+("Russian Federation" . rus)
+("Rwanda" . rwa)
+("Saint Barthélemy" . blm)
+("Saint Helena, Ascension and Tristan da Cunha" . shn)
+("Saint Kitts and Nevis" . kna)
+("Saint Lucia" . lca)
+("Saint Martin" . maf)
+("Saint Pierre and Miquelon" . spm)
+("Saint Vincent and the Grenadines" . vct)
+("Samoa" . wsm)
+("San Marino" . smr)
+("Sao Tome and Principe" . stp)
+("Saudi Arabia" . sau)
+("Senegal" . sen)
+("Serbia" . srb)
+("Seychelles" . syc)
+("Sierra Leone" . sle)
+("Singapore" . sgp)
+("Sint Maarten" . sxm)
+("Slovakia" . svk)
+("Slovenia" . svn)
+("Solomon Islands" . slb)
+("Somalia" . som)
+("South Africa" . zaf)
+("South Georgia" . sgs)
+("South Georgia and the South Sandwich Islands" . sgs)
+("South Sudan" . ssd)
+("Spain" . esp)
+("Sri Lanka" . lka)
+("Sudan" . sdn)
+("Suriname" . sur)
+("Svalbard and Jan Mayen" . sjm)
+("Swaziland" . swz)
+("Sweden" . swe)
+("Switzerland" . che)
+("Syrian Arab Republic" . syr)
+("Taiwan" . twn)
+("Tajikistan" . tjk)
+("Tanzania" . tza)
+("Thailand" . tha)
+("Timor-Leste" . tls)
+("Togo" . tgo)
+("Tokelau" . tkl)
+("Tonga" . ton)
+("Trinidad and Tobago" . tto)
+("Tunisia" . tun)
+("Turkey" . tur)
+("Turkmenistan" . tkm)
+("Turks and Caicos Islands" . tca)
+("Tuvalu" . tuv)
+("Uganda" . uga)
+("Ukraine" . ukr)
+("UAE" . are)
+("United Arab Emirates" . are)
+("UK" . gbr)
+("United Kingdom of Great Britain and Northern Ireland" . gbr)
+("USA" . usa)
+("United States of America" . usa)
+("United States Minor Outlying Islands" . umi)
+("Uruguay" . ury)
+("Uzbekistan" . uzb)
+("Vanuatu" . vut)
+("Venezuela" . ven)
+("Viet Nam" . vnm)
+("Virgin Islands (British)" . vgb)
+("Virgin Islands (U.S.)" . vir)
+("Wallis and Futuna" . wlf)
+("Western Sahara" . esh)
+("Yemen" . yem)
+("Zambia" . zmb)
+("Zimbabwe" . zwe))
"Mapping between a string label for countries or regions, in
English, and a three-letter symbol identifying the country, as
per ISO 3166-1 alpha 3.")
@@ -325,7 +340,7 @@ per ISO 3166-1 alpha 3.")
(defvar ebdb-i18n-phone-codes
'(
;; Need a different way of doing this.
-;("Abkhazia" . ((7 (840 940)) (995 44)))
+ ;; ("Abkhazia" . ((7 (840 940)) (995 44)))
("Afghanistan" . 93)
("Åland Islands" . (358 18))
("Albania" . 355)
@@ -583,7 +598,9 @@ per ISO 3166-1 alpha 3.")
("Uganda" . 256)
("Ukraine" . 380)
("United Arab Emirates" . 971)
+("UK" . 44)
("United Kingdom" . 44)
+("USA" . 1)
("United States" . 1)
("Universal Personal Telecommunications (UPT)" . 878)
("Uruguay" . 598)
@@ -592,7 +609,7 @@ per ISO 3166-1 alpha 3.")
("Vanuatu" . 678)
("Venezuela" . 58)
;; What does this three-part number even mean?
-;("Vatican City State (Holy See)" . (39 06 698))
+;; ("Vatican City State (Holy See)" . (39 06 698))
("Vietnam" . 84)
("Wake Island, USA" . (1 808))
("Wallis and Futuna" . 681)
@@ -645,13 +662,16 @@ for their symbol representations.")
(cl-defmethod ebdb-read :extra "i18n" ((class (subclass ebdb-field-address))
&optional slots obj)
- (let ((country
- (cdr (assoc (completing-read
- "Country: "
- ebdb-i18n-countries nil nil
- (when obj (car (rassoc (ebdb-address-country obj)
- ebdb-i18n-countries))))
- ebdb-i18n-countries))))
+ (let* ((countries (append ebdb-i18n-countries-pref-scripts
+ ebdb-i18n-countries))
+ (country
+ (cdr (assoc (completing-read
+ "Country: "
+ countries
+ nil nil
+ (when obj (car (rassoc (ebdb-address-country obj)
+ countries))))
+ ebdb-i18n-countries))))
(setq slots
(condition-case nil
(ebdb-read-i18n class
diff --git a/ebdb.el b/ebdb.el
index 4a704a5..22f811c 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4731,7 +4731,10 @@ This function is a possible formatting function for
(streets (ebdb-address-streets address)))
(when (symbolp country)
(require 'ebdb-i18n)
- (setq country (car (rassq country ebdb-i18n-countries))))
+ (setq country (car-safe (rassq
+ country
+ (append ebdb-i18n-countries-pref-scripts
+ ebdb-i18n-countries)))))
(concat (if streets
(concat (mapconcat 'identity streets "\n") "\n"))
(ebdb-concat ", " (ebdb-address-locality address)
@@ -4751,7 +4754,7 @@ The formatting rules are defined in
`ebdb-address-format-list'."
(format (nth layout elt))
;; recognize case for format identifiers
case-fold-search str)
- (when (or (eq t identifier) ; default
+ (when (or (eq t identifier) ; default
(and (functionp identifier)
(funcall identifier address))
(and country
@@ -4779,7 +4782,11 @@ The formatting rules are defined in
`ebdb-address-format-list'."
((string-match "%c" form) ; country
(when (symbolp country)
(require 'ebdb-i18n)
- (setq country (car (rassq country
ebdb-i18n-countries))))
+ (setq country (or (car-safe
+ (rassq
+ country
+ (append
ebdb-i18n-countries-pref-scripts
+
ebdb-i18n-countries))))))
(unless (or (not country) (string= "" country))
(setq string (concat string (format
(replace-regexp-in-string "%c" "%s" form t) country)))))
(t (error "Malformed address format element %s"
form)))))
diff --git a/ebdb.info b/ebdb.info
index 6f934fa..442c8af 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -395,16 +395,16 @@ File: ebdb.info, Node: Field Types, Prev: Deleting
Records and Fields, Up: Re
4.4 Field Types
===============
-:ID: cb2190f4-f2e6-4082-9671-24e11e5cc0c6 Fields can be classed in a few
-different categories. Some are “plumbing” fields, that are present for
-all records, but not generally visible or user-editable: these include
-the creation date, timestamp, and UUID. You can view these fields by
-hitting “T” on the record. Other fields are “built-in”: basic fields
-that get special treatment. These include the name, mail, phone,
-address, and notes fields. EBDB comes with default classes for these
-fields: if you would like to use different defaults, you can create new
-classes (inheriting from the existing ones) and use those instead. See
-*note Hacking EBDB:: for more information.
+Fields can be classed in a few different categories. Some are
+“plumbing” fields, that are present for all records, but not generally
+visible or user-editable: these include the creation date, timestamp,
+and UUID. You can view these fields by hitting “T” on the record. Other
+fields are “built-in”: basic fields that get special treatment. These
+include the name, mail, phone, address, and notes fields. EBDB comes
+with default classes for these fields: if you would like to use
+different defaults, you can create new classes (inheriting from the
+existing ones) and use those instead. See *note Hacking EBDB:: for more
+information.
Besides the “plumbing” and “built-in” fields, all other fields are
“user” fields, and belong to one of two types: ‘ebdb-field-user’ and
@@ -1180,8 +1180,10 @@ country-specific libraries.
Country libraries that do not depend on other external libraries may
live within the EBDB codebase, in which case they will be loaded
-automatically when ‘ebdb-i18n’ is loaded. Libraries with extra
-dependencies may be found in the package repositories.
+automatically when ‘ebdb-i18n’ is loaded. Libraries with external
+dependencies may be installed from the package repositories. Because
+function autoloading doesn’t work with generic methods, you’ll need to
+require the libraries in addition to simply installing them.
EBDB currently comes with only one country library, ‘ebdb-i18n-chn’,
for Chinese-related fields. It parses and displays phone numbers and
@@ -1194,13 +1196,28 @@ his own itch. Contributions of new libraries are very
welcome (see
*note Writing Internationalization Libraries::). Also welcome, though
less enthusiastically, are requests for new libraries.
- Internationalization libraries do not modify the database in any way,
-and can be safely unloaded. They simply alter the way EBDB reads,
-parses and displays field values, and can also store extra information
-(eg. for searching purposes) in a record’s cache. Loading this library
-can (depending on country libraries’ behavior) increase database load
-times, though it should not significantly affect search or display
-performance.
+ Internationalization libraries do not modify the database, and can be
+safely unloaded. They simply alter the way EBDB reads, parses and
+displays field values, and can also store extra information (eg. for
+searching purposes) in a record’s cache. Loading this library can
+(depending on country libraries’ behavior) increase database load times,
+though it should not significantly affect search or display performance.
+
+ Actually, the internationalization library does alter database
+storage in one way: address countries can be either stored as a string
+(non-international-aware), or a three-letter symbol representing the
+country code (international-aware). EBDB will correctly display the
+country name for either type of storage, regardless of whether the
+internationalization library is loaded or not.
+
+ Country names are displayed in English by default, but users can
+alter the display of some country names if they choose.
+
+ -- User Option: ebdb-i18n-countries-pref-scripts
+ This is an alist of conses pairing string country names to symbol
+ labels—see the value of ‘ebdb-i18n-countries’ for how to use it,
+ and to find the correct symbol label. Values set in this option
+ will shadow the values in the variable.
File: ebdb.info, Node: Diary Integration, Next: Mail Aliases, Prev:
Internationalization, Up: Top
@@ -1916,42 +1933,42 @@ Node: Inserting New Fields9637
Node: Editing Existing Fields10433
Node: Deleting Records and Fields11033
Node: Field Types11429
-Node: Role Fields13274
-Node: MUA Interaction14965
-Node: Loading MUA Code15489
-Node: Display and Updating16202
-Node: Pop-up Buffers16971
-Node: Auto-Updating Records17836
-Node: Noticing and Automatic Rules20221
-Node: Interactive Commands21564
-Node: EBDB and MUA summary buffers24053
-Node: Sender name display24539
-Node: Summary buffer marks25827
-Node: EBDB Buffers27022
-Node: Searching28215
-Node: Changing Search Behavior29925
-Node: The Basics of ebdb-mode31175
-Node: Marking34539
-Node: Exporting/Formatting34967
-Node: Completion35926
-Node: Snarfing37137
-Node: Internationalization39116
-Node: Diary Integration40848
-Node: Mail Aliases41714
-Node: vCard Support42423
-Node: Org Integration42922
-Node: Citing Records44496
-Node: Hacking EBDB45255
-Node: Field Classes47585
-Node: Init and Delete Methods50522
-Node: The Labeled Field Class52078
-Node: Actions52914
-Node: Custom Field Searching53579
-Node: Formatting in the EBDB Buffer55367
-Node: Writing Internationalization Libraries57366
-Node: Writing Integration For New MUAs61717
-Node: Article snarfing65143
-Node: Index65865
+Node: Role Fields13232
+Node: MUA Interaction14923
+Node: Loading MUA Code15447
+Node: Display and Updating16160
+Node: Pop-up Buffers16929
+Node: Auto-Updating Records17794
+Node: Noticing and Automatic Rules20179
+Node: Interactive Commands21522
+Node: EBDB and MUA summary buffers24011
+Node: Sender name display24497
+Node: Summary buffer marks25785
+Node: EBDB Buffers26980
+Node: Searching28173
+Node: Changing Search Behavior29883
+Node: The Basics of ebdb-mode31133
+Node: Marking34497
+Node: Exporting/Formatting34925
+Node: Completion35884
+Node: Snarfing37095
+Node: Internationalization39074
+Node: Diary Integration41777
+Node: Mail Aliases42643
+Node: vCard Support43352
+Node: Org Integration43851
+Node: Citing Records45425
+Node: Hacking EBDB46184
+Node: Field Classes48514
+Node: Init and Delete Methods51451
+Node: The Labeled Field Class53007
+Node: Actions53843
+Node: Custom Field Searching54508
+Node: Formatting in the EBDB Buffer56296
+Node: Writing Internationalization Libraries58295
+Node: Writing Integration For New MUAs62646
+Node: Article snarfing66072
+Node: Index66794
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index fe1dce2..0ea98ad 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -38,14 +38,8 @@ string, fail to find anything (because you don't have any
records
yet), and finally open a {{{buf(EBDB)}}} buffer where you can start to
make new records (see [[id:692cde31-73be-4faf-b436-7eae8a5d02d1][Creating
Records]]).
** Migration from BBDB
-:PROPERTIES:
-
-:END:
#+CINDEX: Migrating from BBDB
*** Record Migration
-:PROPERTIES:
-
-:END:
It's possible to migrate records from a BBDB file. With your BBDB
customizations still in place, set ~ebdb-sources~ to a non-existent
file name, and then run ~ebdb-load~ (or any of the other EBDB entry
@@ -54,9 +48,6 @@ from BBDB. If any records could not be upgraded, they will be
displayed in an {{{buf(EBDB Migration)}}} buffer. Migration bug
reports are very welcome.
*** Variables and Options
-:PROPERTIES:
-
-:END:
Many of the old BBDB customization options have been changed or
removed entirely in EBDB. It's probably best to put your BBDB
customizations aside, and set new EBDB options as you come across
@@ -174,16 +165,10 @@ You can also tell EBDB which record represents you:
Currently this option's only use is to serve as a source for
~ebdb-user-mail-address-re~.
** Record classes
-:PROPERTIES:
-
-:END:
EBDB comes with two record classes, representing individuals
(~ebdb-record-person~) and organizations (~ebdb-record-organization~).
Records can have "roles" at organizations
[[id:1398bd78-b380-4f36-ab05-44ea5ca8632f][Role Fields]].
** Record names
-:PROPERTIES:
-
-:END:
EBDB comes with two classes for name fields: "simple" and "complex".
Simple names are just a single string, complex names are split out
into surname, given names, suffix, etc. All records have a single
@@ -211,9 +196,6 @@ field altogether. For instance, when creating address
fields, EBDB
will allow you to create an arbitrary number of street lines. When
you've added enough, either enter a blank string, or hit "C-g".
** Editing Existing Fields
-:PROPERTIES:
-
-:END:
#+CINDEX: Editing fields
Pressing "e" (~ebdb-edit-field~) with point on a field will allow you
to edit an existing field, with the previous values as defaults.
@@ -223,9 +205,6 @@ field's values using the Customize interface. Some fields
have slots
that can only be edited this way; other fields have slots that cannot
be edited at all once the field is created.
** Deleting Records and Fields
-:PROPERTIES:
-
-:END:
#+CINDEX: Deleting records and fields
Pressing "C-k" on a field will ask you for confirmation, then delete
the field. Pressing "C-k" while point is on or before a record's main
@@ -233,7 +212,6 @@ name will instead prompt to delete the whole record.
** Field Types
:PROPERTIES:
:ID: cb2190f4-f2e6-4082-9671-24e11e5cc0c6
-
:END:
Fields can be classed in a few different categories. Some are
"plumbing" fields, that are present for all records, but not generally
@@ -894,7 +872,7 @@ dependencies may be installed from the package
repositories. Because
function autoloading doesn't work with generic methods, you'll need to
require the libraries in addition to simply installing them.
-EBDB currently comes with only one country library,
+There is currently only one country library written for EBDB,
@@texinfo:@file{@@ebdb-i18n-chn@@texinfo:}@@, for Chinese-related
fields. It parses and displays phone numbers and names correctly, and
also allows users to search on Chinese names using pinyin. It can be
@@ -906,13 +884,32 @@ his own itch. Contributions of new libraries are very
welcome (see
[[id:5446ff9c-78ca-4e12-89cc-6d4ccd9b2b83][Writing Internationalization
Libraries]]). Also welcome, though less
enthusiastically, are requests for new libraries.
-Internationalization libraries do not modify the database in any way,
-and can be safely unloaded. They simply alter the way EBDB reads,
-parses and displays field values, and can also store extra information
+Internationalization libraries do not modify the database, and can be
+safely unloaded. They simply alter the way EBDB reads, parses and
+displays field values, and can also store extra information
(eg.@@texinfo:@:@@ for searching purposes) in a record's cache.
Loading this library can (depending on country libraries' behavior)
increase database load times, though it should not significantly
affect search or display performance.
+
+Actually, the internationalization library does alter database storage
+in one way: address countries can be either stored as a string
+(non-international-aware), or a three-letter symbol representing the
+country code (international-aware). EBDB will correctly display the
+country name for either type of storage, regardless of whether the
+internationalization library is loaded or not.
+
+#+VINDEX: ebdb-i18n-countries
+Country names are displayed in English by default, but users can alter
+the display of some country names if they choose.
+
+#+TEXINFO: @defopt ebdb-i18n-countries-pref-scripts
+This is an alist of conses pairing string country names to symbol
+labels---see the value of ~ebdb-i18n-countries~ for how to use it, and
+to find the correct symbol label. Values set in this option will
+shadow the values in the variable.
+#+TEXINFO: @end defopt
+
* Diary Integration
#+CINDEX: Diary integration
Some EBDB fields hold dates or anniversaries (most notably the
diff --git a/ebdb.texi b/ebdb.texi
index ef6a57d..ae13d0b 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -410,7 +410,6 @@ name will instead prompt to delete the whole record.
@node Field Types
@section Field Types
-:ID: cb2190f4-f2e6-4082-9671-24e11e5cc0c6
Fields can be classed in a few different categories. Some are
``plumbing'' fields, that are present for all records, but not generally
visible or user-editable: these include the creation date, timestamp,
@@ -1288,8 +1287,10 @@ libraries.
Country libraries that do not depend on other external libraries may
live within the EBDB codebase, in which case they will be loaded
-automatically when @code{ebdb-i18n} is loaded. Libraries with extra
-dependencies may be found in the package repositories.
+automatically when @code{ebdb-i18n} is loaded. Libraries with external
+dependencies may be installed from the package repositories. Because
+function autoloading doesn't work with generic methods, you'll need to
+require the libraries in addition to simply installing them.
EBDB currently comes with only one country library,
@file{ebdb-i18n-chn}, for Chinese-related
@@ -1303,14 +1304,33 @@ his own itch. Contributions of new libraries are very
welcome (see
@ref{Writing Internationalization Libraries}). Also welcome, though less
enthusiastically, are requests for new libraries.
-Internationalization libraries do not modify the database in any way,
-and can be safely unloaded. They simply alter the way EBDB reads,
-parses and displays field values, and can also store extra information
+Internationalization libraries do not modify the database, and can be
+safely unloaded. They simply alter the way EBDB reads, parses and
+displays field values, and can also store extra information
(eg.@: for searching purposes) in a record's cache.
Loading this library can (depending on country libraries' behavior)
increase database load times, though it should not significantly
affect search or display performance.
+Actually, the internationalization library does alter database storage
+in one way: address countries can be either stored as a string
+(non-international-aware), or a three-letter symbol representing the
+country code (international-aware). EBDB will correctly display the
+country name for either type of storage, regardless of whether the
+internationalization library is loaded or not.
+
address@hidden ebdb-i18n-countries-pref-scripts
address@hidden ebdb-i18n-countries
+Country names are displayed in English by default, but users can alter
+the display of some country names if they choose.
+
address@hidden ebdb-i18n-countries-pref-scripts
+This is an alist of conses pairing string country names to symbol
+labels---see the value of @code{ebdb-i18n-countries} for how to use it, and
+to find the correct symbol label. Values set in this option will
+shadow the values in the variable.
address@hidden defopt
+
@node Diary Integration
@chapter Diary Integration
- [elpa] externals/ebdb 2c05d6e 348/350: Wrong slot names when reading addresses, (continued)
- [elpa] externals/ebdb 2c05d6e 348/350: Wrong slot names when reading addresses, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a4e9f16 324/350: Also snarf URL fields, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 761dc23 346/350: Fix bug in searching by database, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6c13763 335/350: Don't require ebdb-chn from ebdb-i18n, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f64c791 347/350: Add internationalized version of ebdb-string for addresses, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 2d74de4 345/350: Use autoload cookies on defclass statements, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a035748 318/350: Mention role fields in the manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5e25f5b 344/350: Remove Brian Edmonds' code until copyright resolved, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e555044 294/350: Expand manual, and edit for use of ox-texinfo-plus, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b9ac670 333/350: Add new manual section about writing MUA integration, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5fbc902 343/350: New option ebdb-i18n-countries-pref-scripts,
Eric Abrahamsen <=
- [elpa] externals/ebdb 84b348e 311/350: Basic finished version of manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 534d3b7 298/350: Start tracking manual texi and info files, Eric Abrahamsen, 2017/08/14