From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.devel Subject: Nasty conflicts between erc-match.el and erc-stamp.el Date: Tue, 06 Apr 2010 22:06:23 +0800 Organization: the Church of Emacs Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270563545 11287 80.91.229.12 (6 Apr 2010 14:19:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Apr 2010 14:19:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 06 16:19:03 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz9cM-0006X1-GS for ged-emacs-devel@m.gmane.org; Tue, 06 Apr 2010 16:19:02 +0200 Original-Received: from localhost ([127.0.0.1]:39347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz9cL-0007AR-Rt for ged-emacs-devel@m.gmane.org; Tue, 06 Apr 2010 10:19:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nz9cG-0007AM-Vt for emacs-devel@gnu.org; Tue, 06 Apr 2010 10:18:57 -0400 Original-Received: from [140.186.70.92] (port=55637 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz9cF-0007AE-RG for emacs-devel@gnu.org; Tue, 06 Apr 2010 10:18:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nz9cE-0004vD-KX for emacs-devel@gnu.org; Tue, 06 Apr 2010 10:18:55 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54091) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz9cE-0004un-BS for emacs-devel@gnu.org; Tue, 06 Apr 2010 10:18:54 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Nz9c9-0006Qe-Ha for emacs-devel@gnu.org; Tue, 06 Apr 2010 16:18:49 +0200 Original-Received: from 123.115.122.41 ([123.115.122.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Apr 2010 16:18:49 +0200 Original-Received: from william.xwl by 123.115.122.41 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Apr 2010 16:18:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 123.115.122.41 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (darwin) Cancel-Lock: sha1:rRUy5LsAg0T+czvoqNJwGNYoOT8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123264 Archived-At: 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