Gnus development mailing list
 help / color / mirror / Atom feed
From: Thomas.Gehrlein@t-online.de (Thomas Gehrlein)
Subject: Fallback for nnmail-split-methods
Date: 20 Apr 2002 11:19:24 +0200	[thread overview]
Message-ID: <wklmbilobn.fsf@t-online.de> (raw)

nnmail-split-fancy has a fallback option for mails that don't match any of the
splitting rules.  nnmail-split-methods doesnt't provide a fallback.  I
discovered this after some of my mails had disappeared.

Here's some code that makes nnmail-split-methods safer.  I'm not really happy
with my approach, but I couldn't figure out how the gnus splitting code works.

(defun nnmail-split-methods-add-fall-back ()
  "Add a fall-back group to nnmail-split-methods if there isn't one."
  ;; check for fall-back: second element of last list of split methods is "".
  (unless (or (eq nnmail-split-methods 'nnmail-split-fancy)
              (string= ""
                       (cadr (elt nnmail-split-methods
                                  (1- (length nnmail-split-methods))))))
    ;; add fall-back if there isn't one
    (setq nnmail-split-methods
          (append nnmail-split-methods (list (list "mail.misc" ""))))))

(add-hook 'nnmail-prepare-incoming-hook 'nnmail-split-methods-add-fall-back)

Thomas




             reply	other threads:[~2002-04-20  9:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-20  9:19 Thomas Gehrlein [this message]
2002-05-08 11:36 ` Kai Großjohann
2002-05-10 14:44   ` Frank Haun
2002-05-11 18:00     ` Kai Großjohann
2002-05-11 18:55   ` Paul Jarc
2002-05-11 21:01     ` Kai Großjohann

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=wklmbilobn.fsf@t-online.de \
    --to=thomas.gehrlein@t-online.de \
    /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).