From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Re: phone links... Date: Thu, 04 Apr 2013 22:38:58 +0200 Message-ID: <515DE4E2.2010704@gmx.de> References: <5156228C.4010400@sift.info> <871uaq7aqy.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080304000000040105070900" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNqwA-0002vK-01 for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 16:39:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNqw5-0003eH-4E for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 16:39:09 -0400 Received: from mout.gmx.net ([212.227.17.22]:63202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNqw4-0003dn-Qz for emacs-orgmode@gnu.org; Thu, 04 Apr 2013 16:39:05 -0400 Received: from mailout-de.gmx.net ([10.1.76.1]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0Lg2uj-1UzNk52WHj-00pe7O for ; Thu, 04 Apr 2013 22:39:02 +0200 In-Reply-To: <871uaq7aqy.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org Mode , Robert Goldman This is a multi-part message in MIME format. --------------080304000000040105070900 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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! > --------------080304000000040105070900 Content-Type: text/x-patch; name="0003-add-telephone-capability-to-org-contacts.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0003-add-telephone-capability-to-org-contacts.patch" >From c3b151d30a45f32679a166ac9fb220f85ad39dd0 Mon Sep 17 00:00:00 2001 From: Simon Thum Date: Sat, 27 Oct 2012 18:25:24 +0200 Subject: [PATCH 3/3] add telephone capability to org-contacts Signed-off-by: Simon Thum --- 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 --------------080304000000040105070900--