From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Strey Subject: Re: phone links... Date: Wed, 3 Apr 2013 16:52:08 +0200 Message-ID: <20130403145208.GC3245@strey.biz> References: <5156228C.4010400@sift.info> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OwLcNYc0lM97+oe1" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNP2u-0005en-4r for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 10:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNP2p-0006am-2U for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 10:52:16 -0400 Received: from mx2.supremebox.com ([198.23.53.42]:38374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNP2o-0006aZ-Uj for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 10:52:10 -0400 Content-Disposition: inline In-Reply-To: <5156228C.4010400@sift.info> 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: emacs-orgmode@gnu.org Cc: Robert Goldman --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. Best regards -- Michael Strey www.strey.biz --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="org-dial.el" ;;; org-dial.el --- Provide org links to dial with the softphone ;;; application linphone ;; Copyright (C) 2011 Michael Strey ;; Author: Michael Strey ;; Keywords: dial, phone, softphone, contacts, hypermedia ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distaributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; `org-dial.el' defines the new link type `dial' for telephone ;; numbers in contacts (refer to org-contacts). Calling this link type ;; leads to the execution of a linphone command dialing this number. ;;; Code: (require 'org) ;; org link functions ;; dial link (org-add-link-type "tel" 'org-dial) (defcustom org-dial-program "linphonecsh dial " "Name of the softphone executable used to dial a phone number in a `tel:' link." :type '(string) :group 'org) (defun org-dial (phonenumber) "Dial the phone number. The variable phonenumber should contain only numbers, whitespaces, backslash and maybe a `+' at the beginning." ;; remove whitespaces from phonenumber (shell-command (concat org-dial-program (trim-phone-number phonenumber)))) (defun trim-phone-number (phonenumber) "Remove whitespaces from a telephone number" (setq trimmed_phonenumber (mapconcat 'identity (delete "(0)" (split-string phonenumber "[ /-]")) ""))) (provide 'org-dial) ;;; org-dial.el ends here --OwLcNYc0lM97+oe1--