Since you're at it: I keep the attached patch personally. I use it to sync org-contacts entries to my phone.

I didn't sign up to the FSF so far, and suck at maintaining emacs commit msg conventions. If the patch is interesting I'll do what is required.

Cheers,

Simon


On 04/04/2013 02:15 PM, Bastien wrote:
Hi Robert,

Robert Goldman <rpgold...@sift.info> writes:

The two files are below, in hopes of getting suggestions for improvement
so that someday this could find itself into contrib/.

Looks like a good start -- please keep us updated about your progress
and your will to include this in contrib/, I'm sure many users would
enjoy it.

Thanks!


>From c3b151d30a45f32679a166ac9fb220f85ad39dd0 Mon Sep 17 00:00:00 2001
From: Simon Thum <simon.t...@gmx.de>
Date: Sat, 27 Oct 2012 18:25:24 +0200
Subject: [PATCH 3/3] add telephone capability to org-contacts

Signed-off-by: Simon Thum <simon.t...@gmx.de>
---
 contrib/lisp/org-contacts.el |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 30b9ed0..dba717f 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -64,6 +64,16 @@ If set to nil, all your Org files will be used."
   :type 'string
   :group 'org-contacts)
 
+(defcustom org-contacts-private-telephone-property "TEL"
+  "Name of the property for contact private/home telephone."
+  :type 'string
+  :group 'org-contacts)
+
+(defcustom org-contacts-work-telephone-property "WORKTEL"
+  "Name of the property for contact work/office telephone."
+  :type 'string
+  :group 'org-contacts)
+
 (defcustom org-contacts-birthday-property "BIRTHDAY"
   "Name of the property for contact birthday date."
   :type 'string
@@ -565,11 +575,15 @@ Org-contacts does not specify how to encode the name. So we try to do our best."
 	 (email (org-contacts-vcard-escape (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)))
+	 (telpriv (org-contacts-vcard-escape (cdr (assoc-string org-contacts-private-telephone-property properties))))
+	 (telwork (org-contacts-vcard-escape (cdr (assoc-string org-contacts-work-telephone-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 telpriv (format "TEL;TYPE=HOME,VOICE:%s\n" telpriv))
+	    (when telwork (format "TEL;TYPE=WORK,VOICE:%s\n" telwork))
 	    (when addr
 	      (format "ADR:;;%s\n" (replace-regexp-in-string "\\, ?" ";" addr)))
 	    (when bday
-- 
1.7.8.6

Reply via email to