Next: , Previous: Customizing the roster buffer, Up: Customization


15.4 Customizing the chat buffer

You can customize the look of the prompts in the chat buffer. There are separate settings for local text (i.e. what you write) and foreign text (i.e. what other people write).

jabber-chat-text-local and jabber-chat-text-foreign determine the faces used for chat messages.

jabber-chat-prompt-local and jabber-chat-prompt-foreign determine the faces used for the prompts.

jabber-chat-local-prompt-format and jabber-chat-foreign-prompt-format determine what text is displayed in the prompts. They are format strings, with the following special sequences defined:

%t
The time when the message was sent or received
%n
The nickname of the user. For the foreign prompt, this is the name of the contact in the roster, or the JID if no name set. For the local prompt, this is the username part of your JID.
%u
The username of the user (i.e. the first part of the JID).
%r
The resource.
%j
The bare JID of the user

jabber-chat-time-format defines how %t shows time. Its format is identical to that passed to format-time-string. See Time Conversion.

jabber-chat-delayed-time-format is used instead of jabber-chat-time-format for delayed messages (messages sent while you were offline, or fetched from history). This way you can have short timestamps everywhere except where you need long ones. You can always see the complete timestamp in a tooltip by hovering over the prompt with the mouse.

By default, timestamps are printed in the chat buffer every hour (at “rare” times). This can be toggled with jabber-print-rare-time. You can customize the displayed time by setting jabber-rare-time-format. Rare timestamps will be printed whenever time formatted by that format string would change.

You can also customize the header line of chat buffers, by modifying the variable jabber-chat-header-line-format. The format of that variable is the same as that of mode-line-format and header-line-format. See Mode-Line Format. For MUC buffers, jabber-muc-header-line-format is used instead.

The variable jabber-chat-fill-long-lines controls whether long lines in the chat buffer are wrapped.