We recommend using the latest release of ERC, but if you can’t or won’t, here’s how to set some things up.
If you like to have a menu entry in your MenuBar for IRC related commands, simply load erc-menu.el in your ~/.emacs:
(require 'erc-menu)
XEmacs users might also need to add the following in order for the menu to be enabled:
(add-hook 'erc-mode-hook (lambda () (easy-menu-add erc-menu erc-mode-map)))
To make the ModeLine match that of Emacs 22, try this.
(setq erc-mode-line-format
(list "-" 'mode-line-mule-info
'mode-line-modified
" " 'target-and/or-server
" " 'status 'away
" %[(" 'mode-name
'mode-line-process
'minor-mode-alist
"%n" ")%]----"
'global-mode-string "-%-"))To remove the server part from the channel identifyer in the mode line, customize ‘erc-mode-line-format’ and change 'target-and/or-server to just 'target. This will save you some mode-line real-estate.
INFO Buffers collect information on the channels you are on.
They are quite CPU intensive, so they’re disabled by default. If you’d like to use them, set the variable ‘erc-use-info-buffers’.
If you don’t want to see the INFO buffers when using ‘iswitchb-buffer’, customize ‘iswitchb-buffer-ignore’ and add the “:INFO$” regexp. Or try this:
(add-to-list 'iswitchb-buffer-ignore ":INFO$")
For ‘ibuffer’, use ‘ibuffer-never-show-regexps’.
(add-to-list 'ibuffer-never-show-regexps ":INFO$")
You could also just use erc-iswitchb bound to C-c C-b by default. Note that this only works from within an ERC buffer.
You can control what buffers pop up when you join channels. See variables ‘erc-join-buffer’ and ‘erc-join-info-buffer’.
First, determine the servers you get redirected to, and then choose a symbol to name them. In my case, I noticed that eventhough I connected to irc.lugs.ch, I got redirected to domains like pacifica.ch and discordia.ch. Therefore:
(add-to-list 'erc-networks '("discordia.ch" lugs-ch))
(add-to-list 'erc-networks '("pacifica.ch" lugs-ch))
(add-to-list 'erc-networks '("brabbel.ch" lugs-ch))Now find out what the exact message looks like that you are getting. Switch on the debug log, and connect to your server.
(setq erc-log-p t)
This will create a debug buffer named `ERC-DEBUG: irc.lugs.ch’ or similar. It will contain lots of junk, but amongst other things, the raw text used to ask you for your password. Here is such an extract:
(#("-NickServ- nick, type /msg NickServ IDENTIFY password. Otherwise,
" 0 1 (rear-sticky t erc-parsed ["NOTICE" "NickServ!services@rubis.ch"
"kensanata" "nick, type /msg NickServ IDENTIFY password .
Otherwise," nil nil nil nil nil nil nil nil nil nil nil nil nil nil
nil nil nil nil nil nil nil nil nil nil nil nil nil nil] face
erc-direct-msg-face) 1 9 (rear-sticky t erc-parsed ["NOTICE"
"NickServ!services@rubis.ch" "kensanata" "nick, type /msg NickServ
IDENTIFY password . Otherwise," nil nil ni
Therefore, add the following to ‘erc-nickserv-alist’.
(add-to-list 'erc-nickserv-alist '(lugs-ch "NickServ!services@rubis.ch" " /msg\\s-NickServ\\s-IDENTIFY\\s- password " "NickServ" "IDENTIFY" nil))
Customize the ERC minor modes to add functionality to ERC. In order to do that, you must first use M-x load-library to load the modules. Once they are loaded, use M-x customize-group to customize the erc group, or M-x customize-option to customize the option, if you already know its name. You should see a lot more options once you have all the modules loaded. If you customize any of the modes, the custom engine will remember to load the appropriate module automatically.
Examples:
If you want to activate filling (ErcFilling):
If you want to activate buttons (ErcButton):
If you want to hilight friends, keywords, ignore fools (ErcHighlighting):
See ErcStartupFiles for approaches based on writing elisp.
ErcMinibufferInput – Input text in the minibuffer to emulate other IRC Clients which have by convention shown the output of the channel in a window, and allowed input via a separate input widget at the bottom of the screen.
Note that the following text was taken from the module pages, so if it’s not explained here, it wasn’t explained there. In that case the comments at the top of the erc*.el files might be of some help.
‘M-x erc-track-modified-channels-mode RET’ to activate it. This interactive function is auto-loaded, so you don’t need to (require ‘erc-track).Old-style, using hippie-expand, in erc-complete.el
New, using ProgrammableCompletion, in erc-pcomplete.el
New Style (For Version ERC 2.93 revision 300 onwards (CVS)) —>
To have pcomplete work automatically, try this:
(add-hook 'erc-mode-hook
'(lambda ()
(require 'erc-pcomplete)
(pcomplete-erc-setup)
(erc-completion-mode 1)))If you prefer to do things manually for each channel, here’s some older advice→
Load the file erc-pcomplete.el, and customize the variable ‘erc-completion-mode’ in order to enable completion.
For older ERCs, In order to add it by hand add this to your ~/.emacs somewhere:
(require 'erc-pcomplete)
(erc-completion-mode) Old Style (require ‘erc-complete)
First of all, choose a directory where channel logs will be placed. You need to create this yourself as ERC will not do it for you. Here’s an example:
mkdir -p ~/.irc/logs
Next up, you need to set some variables to tell ERC to log. The minimum you’ll need is:
(require 'erc-log)
(setq erc-log-channels t)
(setq erc-log-channels-directory "~/.irc/logs/")Hitting C-c C-l in a channel buffer will save a log.
‘erc-smiley-mode’.