Search code examples
emacselisp

emacs erc notification don't work


I want to be notified when someone addresses me on irc. But some reason I can't achieve that.

I tried to set the list erc-modules to include notifications like so:

(require 'erc)
(add-to-list 'erc-modules 'notifications)
(erc-update-modules)

It was giving me:

Symbol's value as variable is void: notifications

So then I simply did

M-x customize option
erc-modules

There I clicked the "notifications" options. And the following was saved to my .emacs file:

(custom-set-variables
 ...
'(erc-modules (quote (autojoin button completion fill irccontrols list log match menu move-to-prompt netsplit networks noncommands notifications readonly ring stamp track)))
 ...
 )

But I still have no notifications. By the way, I left the first code block, from above, in .emacs file. Its still at the very bottom of the .emacs file, after everything else.

So my question is how do I set erc to notify me when someone is addressing a message at me?

Thanks in advance for your kind help and time.

Jenia.


Solution

  • According to the manual ( https://www.gnu.org/software/emacs/manual/html_node/erc/Modules.html ), one method would be to:  (1) set erc-modules manually; and, (2) then call erc-update-modules.

    My interpretation of that is as follows:

    (require 'erc)
    
    (setq erc-modules '(
      autojoin
      button
      completion
      fill
      irccontrols
      list
      log
      match
      menu
      move-to-prompt
      netsplit
      networks
      noncommands
      notifications
      readonly
      ring
      stamp
      track))
    
    (erc-update-modules)
    

    Your other erc settings should be removed.