mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-25 07:27:57 +00:00
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
c0589aa63a
commit
bb6237c937
@ -819,13 +819,19 @@ to do our best."
|
||||
(let* ((properties (caddr contact))
|
||||
(name (org-contacts-vcard-escape (car contact)))
|
||||
(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))))
|
||||
(addr (cdr (assoc-string org-contacts-address-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)))
|
||||
(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
|
||||
(format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr)))
|
||||
(when bday
|
||||
|
Loading…
Reference in New Issue
Block a user