tags:

views:

76

answers:

2

Is there a way to get ERC to highlight all lines that come in that match a certain regexp? For context, I'm using ERC to connect to a bitlbee server and wish that when I issue a 'blist' command, my friends who are online are highlighted in green and those away are highlighted in red.

A: 

I never used ERC, but highlight regex search in emacs can be actived by M-x highlight-regexp

coelhudo
+2  A: 

With erc come several modules. Customise erc-modules so it contains the match module. Then customise erc-keywords, which can contain regexps and cons cells where the regexp is in the car and the face in the cdr.

Don't know about the regexp to distinguish online and away. Is the output from blist different for both?

Edit:

I can't figure out, how to insert custom faces (I mean not existing symbols like the default face) in the customize buffer. So here it is with setting the variable directly:

(setq erc-keywords '(("online-regexp" (:foreground "green"))
                     ("away-regexp" (:foreground "red"))))
andre-r