I’ve begun using Skype regularly, so I wanted a means to access it from Emacs. Of course, someone, in this case buzztaiki, has already done the hard work, so I just made a wrapper around it:
; Skype
(add-to-list 'load-path "/path/to/emacs-skype")
(require 'skype)
(setq skype--my-user-handle "your-skype-handle")
(skype--init)
(defun my-skype-dial-number ()
"Dial the number (maybe from the region). Assumes USA and adds '+1'."
(interactive)
(let* ((number-to-dial
(if (and transient-mark-mode mark-active)
(buffer-substring (region-beginning) (region-end))
(read-from-minibuffer "Number to skype: ")))
(clean-number
(replace-regexp-in-string "[^0-9]" "" number-to-dial)))
(skype--start-call (concat "+1" clean-number))))
Thanks to Jon for the let* help.
If you start getting “ERROR 68″ messages, which indicate “Access Denied”, either skype--init wasn’t called, or you haven’t granted access to the public API by ‘emacs23-dbus’ in your Skype client.
Post a Comment