Let org-contacts.el has the ability which can export email-address list
* org-contacts.el (org-contacts-vcard-format): let the function work with email-address list. The org-contact file is : * Name :PROPERTIES: :EMAIL: name1@test.org; name2@test.org, name3@test.org name4@test.org :END: The export result is like: BEGIN:VCARD VERSION:3.0 N:Name;;; FN:Name EMAIL:name1@test.org EMAIL:name2@test.org EMAIL:name3@test.org EMAIL:name4@test.org END:VCARD
This commit is contained in:
parent
23af13f11a
commit
58afa03d8c
1 changed files with 8 additions and 2 deletions
|
@ -819,13 +819,19 @@ to do our best."
|
||||||
(let* ((properties (caddr contact))
|
(let* ((properties (caddr contact))
|
||||||
(name (org-contacts-vcard-escape (car contact)))
|
(name (org-contacts-vcard-escape (car contact)))
|
||||||
(n (org-contacts-vcard-encode-name name))
|
(n (org-contacts-vcard-encode-name name))
|
||||||
(email (org-contacts-vcard-escape (cdr (assoc-string org-contacts-email-property properties))))
|
(email (cdr (assoc-string org-contacts-email-property properties)))
|
||||||
(bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties))))
|
(bday (org-contacts-vcard-escape (cdr (assoc-string org-contacts-birthday-property properties))))
|
||||||
(addr (cdr (assoc-string org-contacts-address-property properties)))
|
(addr (cdr (assoc-string org-contacts-address-property properties)))
|
||||||
(nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties))))
|
(nick (org-contacts-vcard-escape (cdr (assoc-string org-contacts-nickname-property properties))))
|
||||||
(head (format "BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n" n name)))
|
(head (format "BEGIN:VCARD\nVERSION:3.0\nN:%s\nFN:%s\n" n name)))
|
||||||
(concat head
|
(concat head
|
||||||
(when email (format "EMAIL:%s\n" email))
|
(when email (progn
|
||||||
|
(setq emails-list (split-string email "[,;: ]+"))
|
||||||
|
(setq result "")
|
||||||
|
(while emails-list
|
||||||
|
(setq result (concat result "EMAIL:" (car emails-list) "\n"))
|
||||||
|
(setq emails-list (cdr emails-list)))
|
||||||
|
result))
|
||||||
(when addr
|
(when addr
|
||||||
(format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr)))
|
(format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr)))
|
||||||
(when bday
|
(when bday
|
||||||
|
|
Loading…
Reference in a new issue