all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Nasty conflicts between erc-match.el and erc-stamp.el
@ 2010-04-06 14:06 William Xu
  0 siblings, 0 replies; only message in thread
From: William Xu @ 2010-04-06 14:06 UTC (permalink / raw)
  To: emacs-devel

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-06 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 14:06 Nasty conflicts between erc-match.el and erc-stamp.el William Xu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.