From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Guerry Newsgroups: gmane.emacs.devel Subject: Handle empty regexp in `rmail-nonignored-headers' Date: Sun, 10 Feb 2008 16:37:18 +0000 Message-ID: <87tzkgix8h.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202661490 31331 80.91.229.12 (10 Feb 2008 16:38:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 16:38:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 17:38:33 2008 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.50) id 1JOFCJ-00081v-UG for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 17:38:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOFBq-0004k1-Qa for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 11:38:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOFBG-0004LD-DF for emacs-devel@gnu.org; Sun, 10 Feb 2008 11:37:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOFBE-0004KK-NA for emacs-devel@gnu.org; Sun, 10 Feb 2008 11:37:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOFBE-0004KG-Gg for emacs-devel@gnu.org; Sun, 10 Feb 2008 11:37:24 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOFBE-00044k-Bx for emacs-devel@gnu.org; Sun, 10 Feb 2008 11:37:24 -0500 Original-Received: by ug-out-1314.google.com with SMTP id a2so172210ugf.48 for ; Sun, 10 Feb 2008 08:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject:user-agent:date:message-id:mime-version:content-type:sender; bh=Vsz7rh5xuQpZMv7O7lTOLBMBE2GQQMgQxz1LK0pnPgY=; b=dQWVH7pOUtEoYYqnL0vs0+9gGx9smmZXzEV073d9oajowsFEugZXF3XXuHY0Fgn/9R6vugv3kLWGZH+ne0oT+7sEsM7hDM6VjHMzgWXP+OzZHjDVYDL8umwyEagKeXeRL1jfRYUXL0BFl5j8IxzqfjIrk04eOM0lB3Wo61xgRNI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:user-agent:date:message-id:mime-version:content-type:sender; b=UVu+CQw7cHhDhLEzZ1hMKJ9bW2js9A/87HgcKmtJvjuzNOCMctZ/Evby6HuM4jo5pDKc33IxOOzGzfpuakVBuJhaMdzG8gPMHAX9yxjIZpN0yIKP0lTpB+WJGuLfy1Qvbsa47TgYRxod306EhgVa9ECS3SPSZGqv8BnA9Mxy5TI= Original-Received: by 10.66.244.2 with SMTP id r2mr8000201ugh.64.1202661441672; Sun, 10 Feb 2008 08:37:21 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id k27sm1338943ugd.48.2008.02.10.08.37.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Feb 2008 08:37:20 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id B013D158253; Sun, 10 Feb 2008 16:37:18 +0000 (GMT) User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:88631 Archived-At: The default value for `rmail-nonignored-headers' is "^x-spam-status:". If the user wants to remove this header from the list of non-ignored headers, she will set `rmail-nonignored-headers' to the empty string. This will end up in *not* ignoring any header, which is wrong. This simple patch fixed this -- can I commit it? --- rmail.el.~1.447.~ 2008-02-06 23:54:33.000000000 +0000 +++ rmail.el 2008-02-10 16:30:56.000000000 +0000 @@ -2329,7 +2329,8 @@ (while (and ignored-headers (re-search-forward ignored-headers nil t)) (beginning-of-line) - (if (looking-at rmail-nonignored-headers) + (if (and (not (equal rmail-nonignored-headers "")) + (looking-at rmail-nonignored-headers)) (forward-line 1) (delete-region (point) (save-excursion -- Bastien