Next: Presence alerts, Previous: Customizing alerts, Up: Customizing alerts
Thirteen alerts are already written for all four alert categories. These all obey the result from the corresponding message function.
The beep
alerts simply sound the terminal bell by calling
ding
. They are disabled by default.
The echo
alerts display a message in the echo area by calling
message
. They are enabled by default.
The switch
alerts switch to the buffer where the event occurred
(chat buffer for incoming messages, roster buffer for presence
changes, browse buffer for completed queries). They are disabled by
default. Take care when using them, as they may interrupt your
editing.
The display
alerts display but do not select the buffer in
question, using the function display-buffer
. See Choosing a Window for Display, for information about customizing its behaviour.
This is enabled by default for info requests.
The wave
alerts play a sound file by calling
play-sound-file
. No sound files are provided. To use this,
enter the names of the sound files in
jabber-alert-message-wave
, jabber-alert-presence-wave
and jabber-alert-info-wave
, respectively. You can specify
specific sound files for contacts matching a regexp in the variables
jabber-alert-message-wave-alist
and
jabber-alert-presence-wave-alist
.
The screen
alerts send a message through the Screen terminal
manager1. They do no
harm if called when you don't use Screen.
The ratpoison
alerts send a message through the Ratpoison
window manager2. They
do no harm if used when you're not running X, but if you are running X
with another window manager, the ratpoison processes will never exit.
Emacs doesn't hold on to them, though.
The sawfish
alerts send a message through the Sawfish window
manager.
The wmii
alerts display a message through the wmii window
manager.
The xmessage
alerts send a message through the standard
xmessage
tool. The variable jabber-xmessage-timeout
controls how long the alert appears.
The osd
alerts send a message onto your screen using
XOSD.3
The libnotify
alerts send a message onto your screen using
notification-daemon
.
The festival
alerts speak the message using the Emacs interface
of the Festival speech synthesis system4.
The autoanswer
alert is kind of special: it will not show you
message/muc alert, but instead will automaticaly answer to sender. See
variable `jabber-autoanswer-alist' description for details.
Additionally, for one-to-one and MUC messages, there are scroll
alerts (enabled by default), that aim to do the right thing with chat
buffers that are visible but not active. Sometimes you want point to
scroll down, and sometimes not. These functions should do what you
mean; if they don't, it's a bug.
Also, in MUC you can use a family of so-called “personal” alerts.
They are like other MUC alerts, but fire only on incoming messages
addresed directly to you (also known as “private messages”). One
example of such an alert is jabber-muc-echo-personal
, which shows
a note for an MUC message only if it was addressed to you.
Some of these functions are in the jabber-alert.el file, and the others are in their own files. You can use them as templates or inspiration for your own alerts.
[1] See http://www.gnu.org/software/screen/.
[2] See http://ratpoison.sourceforge.net/.
[3] XOSD can be found at http://www.ignavus.net/software.html. You also need osd.el from http://www.brockman.se/software/osd.el.
[4] See http://www.cstr.ed.ac.uk/projects/festival/.