From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68247 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.gnus.general Subject: Fix scoring on extra headers Date: Wed, 04 Feb 2009 22:43:20 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1233783876 21202 80.91.229.12 (4 Feb 2009 21:44:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2009 21:44:36 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16687@lists.math.uh.edu Wed Feb 04 22:45:46 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUpZ1-0002Dp-If for ding-account@gmane.org; Wed, 04 Feb 2009 22:45:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LUpWp-0000uI-Ur; Wed, 04 Feb 2009 15:43:27 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LUpWo-0000u4-8m for ding@lists.math.uh.edu; Wed, 04 Feb 2009 15:43:26 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LUpWk-00029U-7s for ding@lists.math.uh.edu; Wed, 04 Feb 2009 15:43:26 -0600 Original-Received: from ns1.suse.de ([195.135.220.2] helo=mx1.suse.de) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LUpX3-00022K-00 for ; Wed, 04 Feb 2009 22:43:41 +0100 Original-Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id F3861455AF for ; Wed, 4 Feb 2009 22:43:20 +0100 (CET) X-Yow: Do you have exactly what I want in a plaid poindexter bar bat?? User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux) X-Spam-Score: -7.8 (-------) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68247 Archived-At: This fixes scoring on extra headers. The regexp matching the printed representation does not correctly handle embedded quotes in the value. Andreas. 2009-02-04 Andreas Schwab * gnus-score.el (gnus-score-string): Fix regex for matching extra headers and regexp-quote the match if necessary. --- gnus-score.el 04 Feb 2009 15:36:10 +0100 7.42 +++ gnus-score.el 04 Feb 2009 15:38:08 +0100=09 @@ -2055,8 +2055,11 @@ score in `gnus-newsgroup-scored' by SCOR =20 ;; Evil hackery to make match usable in non-standard headers. (when extra - (setq match (concat "[ (](" extra " \\. \"[^)]*" - match "[^\"]*\")[ )]") + (setq match (concat "[ (](" extra " \\. \"\\([^\"]*\\\\\"\\)*[^\"]*= " + (if (eq search-func 're-search-forward) + match + (regexp-quote match)) + "\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]") search-func 're-search-forward)) ; XXX danger?!? =20 (cond --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."