Tuesday, 12 June 2007

Emacs Jabber

Emacs Jabber很好用,可以在emacs里和gtalk上的朋友聊天。我的emacs是cygwin下的。下面是我的配置:

(require 'jabber)
(custom-set-variables
'(jabber-alert-message-hooks
(quote
(jabber-message-wave
jabber-message-echo )))
'(jabber-alert-message-wave "absolute_path_to_notify.mp3")
'(jabber-connection-ssl-program ssl-program-name)
'(jabber-connection-type (quote ssl))
'(jabber-network-server "talk.google.com")
'(jabber-nickname "jashy")
'(jabber-port 5223)
'(jabber-server "gmail.com")
'(jabber-username "someone")
'(ssl-program-name "/usr/bin/openssl"))


;;;; Define play-sound-file --> mpg321 -q FILE
(defun play-sound-file (FILE)
(call-process "mpg321" nil 0 "-q" FILE))


因为我选了jabber-message-wave的提醒方式,而我的emacs又不能播放声音(play-sound-file不工作,因此我重写了这个方法。用的是比较简单的实现。emacs的版本是:22.1.50.1

2 comments:

vvv said...

JunJie,
thanks for mentioning jabber-network-server. It helped. :-)

JunJie said...

My pleasure :-)