Gnus development mailing list
 help / color / mirror / Atom feed
From: Colin Rafferty <colin@xemacs.org>
Subject: Re: problem with fancy-split's ! operator; bug?
Date: 03 Feb 2000 10:15:17 -0500	[thread overview]
Message-ID: <vgvsnzanwqi.fsf@ms.com> (raw)
In-Reply-To: Matt Swift's message of "Thu, 03 Feb 2000 04:07:52 GMT"

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



  reply	other threads:[~2000-02-03 15:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-02  0:10 Matt Swift
2000-02-02 17:24 ` Colin Rafferty
2000-02-03  4:07   ` Matt Swift
2000-02-03 15:15     ` Colin Rafferty [this message]
2000-02-03 19:50       ` Toby Speight
2000-02-04 13:08         ` Colin Rafferty
2000-02-04 15:44           ` Toby Speight
2000-02-04 19:07             ` Colin Rafferty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vgvsnzanwqi.fsf@ms.com \
    --to=colin@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).