2

I'm unable to get any notifications when getting pinged by people, or sending private messages.

I'm running on osx and running terminal-notifier works fine. I've also tried to execute rcirc-notify-page-test function and it works as expected. However, when people actually send me messages, nothing happens.

I'm using Emacs 24.4.1 (installed via brew) and I installed rcirc-notify manually from the current gist master with hash id 1198200cd2914fb5116d33cedbc774a1cbc1e1d1.

I've copied it to ~/.emacs.d/lisp folder, where .emacs.d/ is a symbolic link, and I've configured it like this:

(add-to-list 'load-path "~/.emacs.d/lisp/")

(eval-after-load 'rcirc '(require 'rcirc-notify))

;; rcirc settings
(eval-after-load "rcirc"
  '(progn
     ;; List of rooms to join
     (setq rcirc-server-alist
       '(("irc.freenode.net" :channels ("#emacs" "#infinispan"))))

     ;; Identification for IRC server connections
     (setq rcirc-default-user-name "galderz"
           rcirc-default-nick      "galderz"
           rcirc-default-full-name "Galder")

     (message "rcirc has been configured.")))

Any ideas how to debug this further, or even better, solve this?

I've tried both terminal and windowed emacs and same thing applies to both.

Thanks in advance!

p.s. I've not tried ERC yet...

Jordon Biondo
  • 12,332
  • 2
  • 41
  • 62
Galder Zamarreño
  • 1,527
  • 2
  • 12
  • 21

1 Answers1

1

First, make sure you're running (rcirc-notify-add-hooks) in your config.

It seems that rcirc-notify simply does not allow itself to work when window-system is nil. So if you are running emacs in a terminal, it will never notify you.

You can get around this with some advice:

(defadvice rcirc-notify (around spoof-window-system activate)
  (let ((window-system 'spoof))
    ad-do-it))

(defadvice rcirc-notify-keyword (around spoof-window-system activate)
  (let ((window-system 'spoof))
    ad-do-it))

(defadvice rcirc-notify-private (around spoof-window-system activate)
  (let ((window-system 'spoof))
    ad-do-it))

The internals of these functions do a (when window-system ... ) which is the problem, so you can simply fake a window-system when calling those functions, and they should work for you.

Jordon Biondo
  • 12,332
  • 2
  • 41
  • 62
  • Hmmm, didn't work, I added: `(eval-after-load "rcirc" '(progn (require 'rcirc-notify) (rcirc-notify-add-hooks)...` and still same – Galder Zamarreño Feb 12 '15 at 15:57
  • I also tried directly from emacs to tall `M-x rcirc-notify-add-hooks` and made no difference :| – Galder Zamarreño Feb 12 '15 at 15:58
  • Thank, I believe I've found the real problem and have updated the answer accordingly. – Jordon Biondo Feb 12 '15 at 17:31
  • 1
    Oh, thanks for the update. I think this might indeed work. I tested `M-x rcirc-notify-add-hooks` in windowed emacs and it did send notifications. I'll apply the changes suggested and see if it works for terminal too. – Galder Zamarreño Feb 13 '15 at 08:33
  • 1
    That worked! I've updated the http://www.emacswiki.org/emacs/rcircNotify page which did not mention the need to add the hooks. Maybe, the wiki should stop providing instructions and instead link to the README file directly? – Galder Zamarreño Feb 13 '15 at 08:53
  • 1
    In the mean time, I'll also create an issue in `rcircNotify` project in order to get this fixed more permanently. – Galder Zamarreño Feb 13 '15 at 08:54
  • 1
    Oh, I see that you created an issue already!! Thanks :D – Galder Zamarreño Feb 13 '15 at 08:55
  • Yeah, in general, github readmes are almost always a better source of info than the emacs wiki which is often out of date and not well directed. – Jordon Biondo Feb 13 '15 at 12:03