From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/29073 Path: main.gmane.org!not-for-mail From: Colin Rafferty Newsgroups: gmane.emacs.gnus.general Subject: Re: problem with fancy-split's ! operator; bug? Date: 03 Feb 2000 10:15:17 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165806 668 80.91.224.250 (21 Oct 2002 02:03:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:03:26 +0000 (UTC) Keywords: split,nnmail-split-it,match,function,documentation,code Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id E649CD051F for ; Thu, 3 Feb 2000 10:17:05 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id JAB24298; Thu, 3 Feb 2000 09:16:34 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 03 Feb 2000 09:16:08 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id JAA29534 for ; Thu, 3 Feb 2000 09:15:50 -0600 (CST) Original-Received: from pivsbh1.ms.com (pivsbh1.ms.com [199.89.64.103]) by mailhost.sclp.com (Postfix) with ESMTP id 2786DD051F for ; Thu, 3 Feb 2000 10:15:47 -0500 (EST) Original-Received: (from uucp@localhost) by pivsbh1.ms.com (8.9.3/fw v1.30) id KAA02259 for ; Thu, 3 Feb 2000 10:15:46 -0500 (EST) Original-Received: from localhost(127.0.0.1) by pivsbh1 via smap (4.1) id sma.9495909321.001290; Thu, 3 Feb 00 10:15:32 -0500 Original-Received: by pivsbh1.ms.com (8.9.3/8.9.3(vs)) id KAA01281 for ; Thu, 3 Feb 2000 10:15:32 -0500 (EST) X-Authentication-Warning: pivsbh1.ms.com: Processed from queue /var/spool/mqueue-vs X-Authentication-Warning: pivsbh1.ms.com: Processed by uucp with -C /etc/mail/sendmail.vs.cf X-Interface: IDMZ Original-Received: from unknown(144.14.9.190) by pivsbh1 via smap (4.1) id sma.9495909181.000107; Thu, 3 Feb 00 10:15:18 -0500 Original-Received: from sag3 (sag3.morgan.com [144.14.193.113]) by safid1.morgan.com (8.8.5/hub+ldap v2.4) with ESMTP id KAA26461 for ; Thu, 3 Feb 2000 10:15:18 -0500 (EST) Original-Received: (craffert@localhost) by sag3 (980427.SGI.8.8.8/sendmail.cf.client v1.05) id KAA81021; Thu, 3 Feb 2000 10:15:17 -0500 (EST) Original-To: GNUS Mailing List X-Attribution: > Mail-Copies-To: never X-Face: ByE+UMAp1klWR3?\RNGx(A-~Ri!YT%C6M!sxoJL+.;9`Q/|+dj7[KR>gGMyV.2qZeot0NI`4\MA^_Qg`F9=+Ox&zaE?Y9dV%F~Xzf';Zyk2Aobs.uu^Ey0_C6^~q';G#$HkA!ZAHXPpG-"*|Dd*Z4U$4y{{aI0c%75}i~Of(jxYtI[uIpYF<*Zoe|\*/ufb X-Y-Zippy: My LESLIE GORE record is BROKEN.. In-Reply-To: Matt Swift's message of "Thu, 03 Feb 2000 04:07:52 GMT" Original-Lines: 45 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) XEmacs/21.2 (Millenium) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:29073 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:29073 Matt Swift writes: > Colin Rafferty wrote: >> Matt Swift writes: >>> The following doesn't work. You get an error when you try to trace >>> the split. The same thing works with the `:' operator as expected. >>> What am I missing, or is this a bug? >>> (defun test-split (dummy) >>> '(& "one" "two")) >>> (setq nnmail-split-fancy '(! test-split "dummy")) >> It looks good to me. What is the error (traceback, please)? > You mean it works for you? Oops, no it doesn't. It simply looked correct to me, given the documentation. The problem is that the documentation does not match the code. Here is the doc for `!': (! FUNCTION SPLIT): Call FUNCTION with the result of SPLIT. The return value FUNCTION should be a split, which is then recursively processed. However, here is the code: ;; Builtin ! operation. ((eq (car split) '!) (funcall (cadr split) (nnmail-split-it (caddr split)))) It should be this (to match `:'): ;; Builtin ! operation. ((eq (car split) '!) (nnmail-split-it (save-excursion (funcall (cadr split) (nnmail-split-it (caddr split)))))) I'm not sure that Lars should change the code to match documentation, since there may be many people out there who depend on this. Although the documented method is much more useful. -- Colin