I am using the below elisp code to modify incoming messages from ERC
(defun my-modify (msg)
(replace-regexp-in-string "abc" "xyz" msg))
(add-hook 'erc-insert-modify-hook 'my-modify)
I am getting the following error
error in process filter: Wrong number of arguments: (lambda (msg)
(replace-regexp-in-string "abc" "xyz" msg)), 0
I am not sure what’s wrong in my previous code, but I was able to modify incoming messages using this code (from http://mwolson.org/projects/emacs-config/erc-init.el)
This works as expected, but what I really wanted was to strip away a particular nick and display only the message. However I don’t think that’s possible at ERC level. Rather I will have to try it at the buffer level.