[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 02808bb 047/118: Let org-contacts.el
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 02808bb 047/118: Let org-contacts.el has the ability which can export email-address list |
Date: |
Fri, 12 Nov 2021 15:37:01 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 02808bbf797a8917b1cecd88bae84efb45c09d80
Author: Feng Shu <tumashu@gmail.com>
Commit: Bastien Guerry <bzg@altern.org>
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
---
org-contacts.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index e78b9da..b85ae2d 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -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
- [elpa] scratch/org-contacts-rebased 2e77024 017/118: Copyright year fixes for contrib/., (continued)
- [elpa] scratch/org-contacts-rebased 2e77024 017/118: Copyright year fixes for contrib/., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 99994ed 039/118: contrib/lisp/org-contacts.el (org-contacts-complete-name): Prevent an error when there is no completion available, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased f46131e 051/118: org-contacts.el (org-contacts-matcher): Better matcher, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8ccb82f 052/118: org-contacts.el , fix bugs about 'tel and 'note properties, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5ee8caa 053/118: org-contacts.el, add name alias property., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c0ebd3a 055/118: contrib/lisp/org-contacts: Allow org links in properties, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 1b6cff5 026/118: contrib/lisp/org-contacts.el: Fix indentation of the file, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dcd8af9 028/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2d1ea82 046/118: contrib/lisp/org-contacts.el: Silence byte-compiler, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7c908e4 043/118: org-contacts.el: Fix or add docstrings, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 02808bb 047/118: Let org-contacts.el has the ability which can export email-address list,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 927e7c7 035/118: org-contacts.el: Check if the database need a refresh in a dedicated function, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e86b83d 036/118: org-contacts.el: Started to silent byte-compiler, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c08b676 032/118: Add caching mecanism, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 543f2c5 045/118: contrib/lisp/org-contacts.el: Remove calls to cl functions, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d7412d5 054/118: contrib/lisp/org-contacts: Fix two typos in comments, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2f0d7e9 002/118: org-contacts: make Gnus usage optional, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ad7f57a 023/118: Fix error messages: don't use a dot at the end, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5526110 018/118: Merge branch 'origin-maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 68918fc 034/118: org-contacts: Fix Agenda format., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 85b506b 031/118: contrib/lisp/org-contacts.el: Delete trailing whitespaces, Stefan Monnier, 2021/11/12