Next: Typing notifications, Previous: Useful features, Up: Top
If you want a record of messages sent and received, set
jabber-history-enabled
to t. By default all messages will
be saved to a global history file specified by
jabber-global-history-filename
(~/.jabber_global_message_log by default). If you prefer to
store your chats' history in per-contact files, you can set
jabber-use-global-history
to nil
. When using
per-contact history, files are named by the contact JID and saved
under the directory specified by the variable
jabber-history-dir
(default is ~/.emacs-jabber).
When you open a new chat buffer and have entries in your history file,
the last few messages you recently exchanged with the contact in
question will be inserted. You can control how many messages with
jabber-backlog-number
(by default 10), and how old messages
with jabber-backlog-days
(by default 3 days).
If you want to see more messages, use the function
jabber-chat-display-more-backlog
, available in the Chat menu.
This is currently the only way to view the message history, apart from
opening the history files manually.
If you worry about your history file(s) size, you can enable history
rotation feature by setting the variable
jabber-history-enable-rotation
to t
(default is
nil
). This feature “rotates” your history files according to
the following rule: When jabber-history-size-limit
(in
kilobytes) is reached, the history-file is renamed to
history-file-number, where number is 1 or the smallest number
after the last rotation.
For example, suppose you set the
jabber-history-size-limit
variable to 512 and you chat with
your buddy ‘foo@jabber.server’ using the per-contact strategy to store
history files. So, when the history file (foo@jabber-server)
reaches 512K bytes, it will be renamed to foo@jabber-server-1
and foo@jabber-server will be set empty. Next time
foo@jabber-server grows to 512K bytes, it will be saved as
foo@jabber-server-2 and so on. Although the example was
presented with the per-contact history file strategy, history rotation
works for both per-contact and global history logging strategies.
If you also want to keep chat and groupchat buffers from growing too
much, you can customize jabber-alert-message-hooks
and
jabber-alert-muc-hooks
by adding truncation upon receiving
message (jabber-truncate-chat
and jabber-truncate-muc
, respectively).
The truncation limit may be set by customizing the variable
jabber-log-lines-to-keep
.