Using Skype from Emacs

Published 2011-03-22

I use Skype and I want to be able to dial from Emacs.


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 have to make a wrapper.


And here it is:

; Skype

(add-to-list 'load-path "/path/to/emacs-skype")
(require 'skype)

(setq skype--my-user-handle "your-skype-handle")


(defun my-skype-dial-number ()
  "Dial the number (maybe from the region). Assumes USA and adds '+1'."
  (let* ((number-to-dial
         (if (and transient-mark-mode mark-active)
             (buffer-substring (region-beginning) (region-end))
           (read-from-minibuffer "Number to skype: ")))
          (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.