Customize ERC (Emacs) for logging

This post was moved as-is from my old WordPress site.

Recently I want to log my IRC traffic even when I'm away so I registered a free shell account on shellmix.com and configured ZNC to run on it. ERC is my choice of IRC client. It's powerful and heavily customizable because of Emacs' nature (E-Lisp for extensions). Here's my .emacs config:

1
2
3
4
5
6
7
8
  ;; erc logging
  (setq erc-generate-log-file-name-function 'erc-generate-log-file-name-with-date
        erc-log-matches-flag t
        erc-save-buffer-on-part nil
        erc-save-queries-on-quit nil
        erc-log-write-after-send t
        erc-log-write-after-insert t
        erc-log-file-coding-system 'utf-8)

Above config makes ERC log every message and write to log files right after receive or send. I don't want it to write when I close Emacs and then ask for saving ​~​.~, which is the default behavior.

That's all, folks :D .


Last modified on 2011-03-06