[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] phone links...
From: |
Michael Strey |
Subject: |
Re: [O] phone links... |
Date: |
Thu, 4 Apr 2013 10:26:54 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Robert,
On Wed, Apr 03, 2013 at 10:05:57AM -0500, Robert Goldman wrote:
> On 4/3/13 Apr 3 -9:52 AM, Michael Strey wrote:
> > This gives me the opportunitie to publish my own attempt to implement
> > telephone functionality into org. I'm using Linphone
> > (http://www.linphone.org/) instead of Skype.
>
> Thanks! I am folding the linphone code in to make org-phone more generic.
Great!
> Question: why the removal of "(0)"? For international calls? Why "(0)" only,
> instead of any 0 prefix?
>
> Also, do you ever want to remove it anywhere but as a prefix?
> If so, maybe DELETE is the wrong function call.
Linphone requires the numbers in form 0033456833 or +33456833 respectively.
Usually my phone links look like [[tel:+49 351 4129535]]; but since I
imported data sets from a larger contact data base that had evolved over
time, I ended up with stuff like this in my data base:
1. [[tel:0033 (0) 4568-33]]
2. [[tel:+49 (0)3 8899 66]]
3. [[tel:0351 41295-35]]
4. [[tel:0351/4129535]]
5. [[tel:(0351) 412 95-35]]
My filter function currently handles the cases 1. to 4. but (for no
other reason than carelessness) not 5.
#+BEGIN_SRC emacs-lisp
(defun trim-phone-number (phonenumber)
"Remove whitespaces from a telephone number"
(setq trimmed_phonenumber
(mapconcat 'identity
(delete "(0)" (split-string phonenumber "[ /-]")) "")))
#+END_SRC
Regards
--
Michael Strey
www.strey.biz
- Re: [O] phone links..., Robert Goldman, 2013/04/01
- Re: [O] phone links..., Bastien, 2013/04/04
- Re: [O] phone links..., Simon Thum, 2013/04/04
- Re: [O] phone links..., Robert P. Goldman, 2013/04/04
- Re: [O] phone links..., Bastien, 2013/04/05
- Re: [O] phone links..., Simon Thum, 2013/04/06
- Re: [O] phone links..., Simon Thum, 2013/04/06
- Re: [O] phone links..., Bastien, 2013/04/06
Re: [O] phone links..., Robert P. Goldman, 2013/04/04