djcb / sauron

emacs event log (WIP)
226 stars 26 forks source link

ERC events not received in recent master branch Emacs (~February 2019) #61

Open Jehops opened 5 years ago

Jehops commented 5 years ago

After upgrading master branch Emacs to 52cd63d1 (20190227) from b32ac17 (20190203), ERC events are not being logged. Here are steps to reproduce the problem.

  1. emacs -Q
  2. Evaluate this code.
    
    (setq sauron-nick-insensitivity 5)
    (setq sauron-hide-mode-line t)
    (setq sauron-modules '(sauron-erc))

(add-to-list 'load-path "/home/jrm/.emacs.d/elpa/sauron-20181216.1200")

(require 'sauron)

(defun jrm/sauron-speak-erc (origin prio msg props) "When ORIGIN is erc with priority at least PRIO, say MSG ignoring PROPS." (when (eq origin 'erc) (call-process-shell-command (concat "flite -voice /home/" (user-login-name) "/local/share/data/flite/cmu_us_aew.flitevox \"I-R-C message: " msg "\"&") nil 0)))

(sauron-start)


3. Log in to ERC, receive mentions or messages and the only event that is listed in the Sauron buffer is the `sauron started` event. 
turkja commented 4 years ago

This may be related to what I found when trying Emacs 27.1: in sauron-erc.el there's a check for erc-version-string, which is not apparently any more a fixed string. I fixed this in sauron-erc-start by changing

(boundp 'erc-version-string)

to

(fboundp 'erc-version)

So instead of checking for fixed version string, check for function returning the version. I don't know if this is correct solution, but so far seems to work.