I get this behavior when I, or somebody else, is already logged into the server with my original username. If I open ERC twice, logging in as tikhon both times, the second login is automatically changed to tikhon`.
This can happen if you first connect and then time out. The IRC server gives you a grace period before kicking you off; if you try to log in ...
Emacs comes with auth-source.el. I would not try to roll my own version of it.
auth-source makes it easy to read from ~/.authinfo.gpg. Good programs will already support authinfo. A quick search suggests that ERC can use authinfo.
For your random off the shelf MELPA programs you can easily use authinfo to retrieve your password from ~/.authinfo.gpg like ...
(setq erc-join-buffer 'bury)
erc-join-buffer is a variable defined in `erc.el'.
Its value is bury
Determines how to display a newly created IRC buffer.
The available choices are:
'window - in another window,
'window-noselect - in another window, but don't select that one,
'frame - in another frame,
custom-set-variables is weird – I'm not 100% sure it can handle cases like this. You may try (eval `(custom-set-variables … (erc-password … ,(special-value) …) …), but that strikes me as a dirty hack-around.
Just put the extra information in a file with the gpg extension, save it, give a password, and then load the file. You'll have to put the password ...
Another way is to use the ns-do-applescript elisp function:
(ns-do-applescript "display notification \"hello world\"")
(ns-do-applescript "display notification \"hello world\" with title \"some title\"")
to run AppleScript from Emacs.
More info on what commands are available in AppleScript:
Try setting C-hv erc-track-exclude-types
For me, the original value was ("NICK" "333" "353") and I have it set to:
("JOIN" "KICK" "NICK" "PART" "QUIT" "MODE" "333" "353")
The numeric values can be specific to the IRC daemon you are connected to, and might entail trial and error on your part to figure out which values are creating noise for you.
e.g. The ...
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
You can use describe-variable if you are looking for variables. It's very convenient when you want to change a certain behaviour and you don't the variables's name.
If you started Emacs normally, so that it read your init file, then yes, Customize should let you save any changes you make. If it does not, then that sounds like a bug.
If you did not start Emacs using switch q or Q (or equivalent, which means not to read your init file), and if you tried to save Customize settings and Emacs gave you that error message, ...
If this is on account of erc-notifications-mode generating a notification because your nick was mentioned in the channel (on account of being listed in "*** Users on ..." message), then you'll have to dig into that functionality.
Or just disable the mode with (erc-notifications-mode 0) or similar to disable all notifications.
If that's the reason, then erc-...
I ended up patching the erc-login function to use the SASL extension. I first installed this package https://github.com/joseph-gay/erc-sasl and added this to my init file:
(add-to-list 'erc-sasl-server-regexp-list "irc\\.freenode\\.net")
(defun erc-login ()
"Perform user authentication at the IRC server. (PATCHED)"
(erc-log (format "...
You can create your own command to set all variables before starting ERC:
(defun my/erc-freenode ()
(let ((erc-plist (car (auth-source-search :host "irc.freenode.net")))
(setq erc-server "irc.freenode.net")
(setq erc-nick (plist-get erc-plist :user))
(setq erc-password (funcall (plist-get ...
Thanks to jbornhold answer in this reddit discussion, I was able to enable notifications for erc nick mentions.
Here's how you can do it:-
install terminal notifier with brew install terminal-notifier
install erc-terminal-notifier.el and add (require 'erc-terminal-notifier) in your .emacs
You might want to enable -reply option in erc-terminal-notifier.el ...