From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Gauland Newsgroups: gmane.emacs.devel Subject: Someone broke erc-match Date: Wed, 13 Feb 2013 14:55:48 +1300 Message-ID: <87halhq8nv.fsf@dimension8.tehua.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1360721541 27123 80.91.229.3 (13 Feb 2013 02:12:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2013 02:12:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 03:12:41 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U5Rpv-00063l-T0 for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2013 03:12:40 +0100 Original-Received: from localhost ([::1]:48832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Rpc-0005LS-85 for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2013 21:12:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5RpZ-0005LL-3Q for emacs-devel@gnu.org; Tue, 12 Feb 2013 21:12:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5RpY-0005Kh-5b for emacs-devel@gnu.org; Tue, 12 Feb 2013 21:12:17 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5RZu-0001kL-3m for emacs-devel@gnu.org; Tue, 12 Feb 2013 20:56:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U5RaB-0003Nw-In for emacs-devel@gnu.org; Wed, 13 Feb 2013 02:56:23 +0100 Original-Received: from 114-134-8-58.rurallink.co.nz ([114.134.8.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Feb 2013 02:56:23 +0100 Original-Received: from aidalgol by 114-134-8-58.rurallink.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Feb 2013 02:56:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 66 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114-134-8-58.rurallink.co.nz User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:xTto6dPNRm3dtEZk6M5OVjilIHU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156994 Archived-At: --=-=-= Content-Type: text/plain To Stefan Monnier: When applying my erc-match patch, you broke another part: === modified file 'lisp/erc/erc-match.el' --- lisp/erc/erc-match.el 2013-01-02 16:13:04 +0000 +++ lisp/erc/erc-match.el 2013-02-11 22:53:36 +0000 @@ -447,16 +447,24 @@ (nth 0 (erc-parse-user nickuserhost)))) (old-pt (point)) (nick-beg (and nickname - (re-search-forward (regexp-quote nickname) + (re-search-forward "\\(\\* \\)?"(regexp-quote nickname) (point-max) t) It's not clear what was intended, so I cannot suggest a fix (aside from simply reverting). I also submitted a patch that supersedes my patch, which actually caused an out-of-range error for every non-ACTION message. Obviously worse than truncating ACTION messages. Here's my patch fix: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=erc-match-ACTION-fix-fix.patch Content-Description: erc-match ACTION repatch === modified file 'lisp/erc/erc-match.el' --- lisp/erc/erc-match.el 2013-02-11 22:53:36 +0000 +++ lisp/erc/erc-match.el 2013-02-13 01:54:07 +0000 @@ -455,14 +455,14 @@ (message (buffer-substring (if (and nick-end (<= (+ 2 nick-end) (point-max))) + ;; Message starts 2 characters after the nick + ;; except for CTCP ACTION messages. Nick + ;; surrounded by angle brackets only in normal + ;; messages. (+ nick-end - ;; Message starts 2 characters after the nick except - ;; for CTCP ACTION messages. - (if (string= "* " - (buffer-substring (- nick-beg 2) - nick-beg)) - 1 - 2)) + (if (eq ?> (char-after nick-end)) + 2 + 1)) (point-min)) (point-max)))) (when (and vector --=-=-= Content-Type: text/plain Regards, Aidan Gauland --=-=-=--