[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Nasty conflicts between erc-match.el and erc-stamp.el
From: |
William Xu |
Subject: |
Nasty conflicts between erc-match.el and erc-stamp.el |
Date: |
Tue, 06 Apr 2010 22:06:23 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (darwin) |
Hi!
If erc-stamp-mode is enabled before erc-match-mode,
erc-text-matched-hook will never succeed. Try below and edebug
my-erc-text-matched-hook.
(erc-stamp-mode 1)
(setq erc-insert-timestamp-function
'erc-insert-timestamp-left)
(erc-match-mode 1)
(defun my-erc-text-matched-hook ()
(message "matched!"))
(add-hook 'erc-text-matched-hook 'my-erc-text-matched-hook)
The cause is that `erc-match-message' tries to find erc-parsed property
at (point-min) in line:
(vector (erc-get-parsed-vector (point-min)))
But when timestamp mode is enabled earlier, it will insert a timestamp
string to the beginning, with its own text properties, in
`erc-timestamp-format-left'. Hence, this makes erc-match-message fail.
One not-so-good solution is scan the whole line looking for the
erc-parsed property.
This nasty thing had annoyed a newcomer, and took a while to figure what
was going wrong...
--
William
http://xwl.appspot.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Nasty conflicts between erc-match.el and erc-stamp.el,
William Xu <=