Next: , Previous: Customizing alerts, Up: Customizing alerts



15.6.1 Standard alerts

Eight 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 (GNU Emacs Lisp Reference Manual), 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 manager (see http://www.gnu.org/software/screen/). They do no harm if called when you don't use Screen.

The ratpoison alerts send a message through the Ratpoison window manager (see http://ratpoison.sourceforge.net/). 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. You can look at them with list-processes.

The sawfish alerts send a message through the Sawfish window manager.

The festival alerts speak the message using the Emacs interface of the Festival speech synthesis system (see http://www.cstr.ed.ac.uk/projects/festival/).

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.

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.