On 18 Jan 2007, [EMAIL PROTECTED] wrote:

> Ted Zlatanov <[EMAIL PROTECTED]> writes:
>
> Hi Ted,
>
>>>> I use Gnus with an IMAP account and let gnus demon check for new
>>>> mail every 5 minutes of emacs idle time.
>>>>
>>>> Now I'd like to run a function whenever new mail arrives.
>>
>> You could run something in the nn*-split-fancy list, and always return
>> nil (so it will not actually affect the splitting).
>
> I tried this:
>
> ,----[ ~/.gnus.el ]
> | (defun th-new-imap-mail ()
> |   (shell-command (concat "append-to-dwm-statusbar.fish "
> |                          "Gnus: New mail!"))
> |   nil)
> | 
> | (setq nnimap-split-rule 'nnimap-split-fancy
> |       nnimap-split-fancy '(: th-new-imap-mail))
> `----
>
> But the function `th-new-imap-mail' is never run.
>
> Any ideas?

Get split-fancy running without the function (just send the mail to
INBOX.mail or whatever you like).  Then you can add functions--the
problem is likely to be that the split-fancy stuff is not running
correctly.

My setup is appended in case it helps...  I use nnimap-split-rule
because I have 4 servers in there.

Ted

(defun nnimap-courier-lifelogs-split-fancy ()
  (let ((nnimap-split-fancy nnimap-courier-lifelogs-split-fancy)
        (spam-split-group "INBOX.spam"))
    (nnimap-split-fancy)))

(setq 
 ;;; my server name matches "lifelogs"
 nnimap-split-rule '(
                     ("lifelogs" ("INBOX" nnimap-courier-lifelogs-split-fancy)))
 nnimap-split-inbox "INBOX"
 nnimap-courier-lifelogs-split-fancy '(|
                      (: gnus-registry-split-fancy-with-parent)
                      (: spam-split 'spam-use-regex-headers)
;;; more rules...
                      (any "ding" "INBOX.ding")
;;; more rules...
                      (: spam-split)
                      ;; default mailbox
                      "INBOX.mail"))

_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to