Next: , Previous: Useful features, Up: Top



11 Message history

If you want a record of messages sent and received, set jabber-history-enabled to t. By default all messages to 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 the jabber-use-global-history variable 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).

There is no facility for reading old messages yet, but just reading the file as text should be enough for many purposes.

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 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.