all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* phone links...
@ 2013-03-29 23:23 Robert Goldman
  2013-03-30  9:12 ` Karl Voit
                   ` (4 more replies)
  0 siblings, 5 replies; 45+ messages in thread
From: Robert Goldman @ 2013-03-29 23:23 UTC (permalink / raw)
  To: Org Mode

Since I keep my todo tasks in my org files, and some of them involve
phone calls, I made a rudimentary handler for "phone:" links that I
would like to contribute.  It features a link declaration (in
org-phone.el) and an ancillary script (currently only working on Mac OS
X, but should be translatable to other platforms) that can be used to
place skype calls to the phone numbers.

One thing it does not do is support interactive entry of phone numbers.

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

Cheers,
r

--------------------org-phone.el--------------------
;;;---------------------------------------------------------------------------
;;; org-phone.el
;;; Add support for "phone:" links to phone numbers.
;;; Optional support for calling them with skype
;;;---------------------------------------------------------------------------

;;; Copyright (C) 2013 Free Software Foundation, Inc.

;; Author: Robert P. Goldman <rpgoldman at sift dot net>
;; Homepage: http://orgmode.org
;; Version: 0.01

;; This file is not yet part of GNU Emacs.
(require 'org)

(org-add-link-type "phone" 'org-phone-open)
;; not sure whether we need/want this yet...
;;(add-hook 'org-store-link-functions 'org-phone-store-link)

(defcustom org-phone-function 'skype-call
  "The Emacs function to be used to call a phone number."
  :group 'org-link
  :type 'symbol)

(defcustom org-skype-command "skype-call"
  "The executable command to be used to call a phone number.
This should be a script that starts the call and returns: it
should not block."
  :group 'org-link
  :type 'string)


(defun org-phone-open (phone-number)
  "Phone the number PHONE-NUMBER.
PHONE-NUMBER should be a string for a PSTN phone number."
  (funcall org-phone-function phone-number))

(defun skype-call (phone-number)
  (shell-command (format "%s %s"
			 org-skype-command
			 phone-number)))



;; (defun org-phone-store-link ()
;;   "Store a link to a phone number."
;;     ;; This is a man page, we do make this link
;;     (let* ((page (org-man-get-page-name))
;; 	   (link (concat "man:" page))
;; 	   (description (format "Manpage for %s" page)))
;;       (org-store-link-props
;;        :type "man"
;;        :link link
;;        :description description))))


(provide 'org-phone)

--------------------skype-call--------------------
#!/bin/sh

command="CALL $1"

osascript -e 'tell application "Skype"' \
          -e "send command \"${command}\" script name \"skype-call\"" \
          -e 'end tell'

^ permalink raw reply	[flat|nested] 45+ messages in thread
* Re: [Patch] phone links...
@ 2013-05-31 14:39 Michael Strey
  0 siblings, 0 replies; 45+ messages in thread
From: Michael Strey @ 2013-05-31 14:39 UTC (permalink / raw)
  To: Daimrod; +Cc: emacs-orgmode


Daimrod <daimrod@gmail.com> writes:

> While merging a patch (from Feng Shu) I have found a bug in
> `org-contacts-split-property'. Though the docstring says that OMIT-NULLS
> is forced to t when SEPARATORS is nil (just like `split-string'), it
> wasn't the case. I've pushed a fix; could you check on your side that it
> doesn't break anything in your workflow?

I'm fine with your update.  Thank you for the correction!

-- 
Michael Strey
mailto:mstrey@strey.biz
http://www.strey.biz

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2013-05-31 14:40 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 23:23 phone links Robert Goldman
2013-03-30  9:12 ` Karl Voit
2013-04-01 13:30 ` Robert Goldman
2013-04-03 14:52 ` Michael Strey
2013-04-03 15:05   ` Robert Goldman
2013-04-04  8:26     ` Michael Strey
2013-04-04 13:55       ` Michael Strey
2013-04-04 12:15 ` Bastien
2013-04-04 20:38   ` Simon Thum
2013-04-05  3:04     ` Robert P. Goldman
2013-04-05  6:42     ` Bastien
2013-04-06 12:05       ` Simon Thum
2013-04-06 12:10       ` Simon Thum
2013-04-06 20:58         ` Bastien
2013-04-05  2:38   ` Robert P. Goldman
2013-04-08 10:38     ` Michael Strey
2013-04-08 12:47       ` Robert Goldman
2013-04-08 14:07         ` Michael Strey
2013-04-08 14:44           ` Robert Goldman
2013-04-09  7:31             ` Michael Strey
2013-04-09 12:19               ` Robert Goldman
2013-04-09 14:40                 ` Michael Strey
2013-04-13 14:12               ` Feng Shu
2013-04-13 14:43                 ` Feng Shu
2013-04-14  8:38                   ` Bastien
2013-04-14 14:31                     ` Feng Shu
2013-04-15 15:39                       ` Bastien
2013-04-15 23:37                         ` Feng Shu
2013-04-16 21:11                       ` Daimrod
2013-04-17  3:55                         ` Feng Shu
2013-04-17  6:10                           ` Daimrod
2013-04-14 20:49               ` Michael Strey
2013-04-16 22:22                 ` Daimrod
2013-04-17 10:28                   ` Michael Strey
2013-04-20 15:59                     ` Daimrod
2013-04-26 12:48                       ` [Patch] " Michael Strey
2013-04-30  9:09                         ` Daimrod
2013-05-31  0:04                         ` Daimrod
2013-04-09  9:57       ` Feng Shu
2013-04-10 14:17 ` Michael Strey
2013-04-11 10:27   ` Michael Strey
2013-04-16  7:57     ` Eric S Fraga
2013-04-16 12:25       ` Robert P. Goldman
2013-04-17  8:14         ` Michael Strey
  -- strict thread matches above, loose matches on Subject: below --
2013-05-31 14:39 [Patch] " Michael Strey

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.