[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nnimap-generate-folder-list-from-bbdb, almost.
From: |
Uwe Brauer |
Subject: |
nnimap-generate-folder-list-from-bbdb, almost. |
Date: |
Wed, 23 Feb 2005 20:37:03 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4.17 (linux) |
Hello
Some weeks ago I asked for a function which would allow to generate a
entry in the nnimap-split-fancy list, based on a relevant bbdb entry.
I am almost there, that is I obtained a function
(my:nnimap-folder-list-from-bbdb) --which I have added below--
Evaluation the function, that
(eval-expression '(my:nnimap-folder-list-from-bbdb) nil)
returns
(
("From" "bill@upct\\.es" "testbill")
^this is the relevant bbdb entry.
("From" "oub@mat\\.ucm\\.es" "testimap"))
^this is the relevant bbdb entry.
Now the problem is I don't know who to add this to the
nnimap-split-entry
That variable is as follows:
(setq
nnimap-split-rule 'nnimap-split-fancy
nnimap-split-inbox "INBOX"
nnimap-split-fancy
'(|
("Subject" "POSIBLE SPAM" "SPAM.POSS")
("Subject" ".*\\[labest05\\].*" "Labest05")
("To" "xemacs-patches@xemacs.org" "Xemacs-patches") ;
("Sender" "xemacs-patches-bounces@xemacs.org" "Xemacs-patches") ;
("To" " users@dba.openoffice.org" "OO-dba") ;
("Sender" "preview-latex-devel-admin@lists.sourceforge.net" "Preview-latex")
;
("Sender" "linux-thinkpad-admin@linux-thinkpad.org" "Linux-thinkpad") ;
("From" "MA_Quimicas@mat.ucm.es" "Secrequi")
("From" "Matematica_Aplicada@mat.ucm.es" "Secremat")
(: setq spam-use-BBDB-exclusive nil)
(: spam-split 'spam-use-BBDB 'spam-use-stat "SPAM.REAL")
(: spam-split 'spam-use-regex-headers "SPAM.POSS") ;Version:1.10
(: setq spam-use-BBDB-exclusive t fake-variable nil)
(: spam-split 'spam-use-BBDB "SPAM.HAM")
(: setq spam-use-BBDB-exclusive nil)
"MAILBOX"))
So I thought of either doing
(defun my:nnimap-generate-folder-list-from-bbdb ()
"Sets 'nnimap-folder-list to the result of
my:nnimap-folder-list-from-bbdb."
(interactive)
(add-to-list 'nnimap-split-fancy
(my:nnimap-folder-list-from-bbdb) ))
Which resulted in
`nnimap-split-fancy' is a variable declared in Lisp.
-- loaded from "nnimap"
Value: ((("From" "oub@mat\\.ucm\\.es" "testimap")) | ("Subject"
"POSIBLE SPAM" "SPAM.POSS") ("Subject" ".*\\[labest05\\].*"
"Labest05") ("To" "xemacs-patches@xemacs.org" "Xemacs-patches")
("Sender" "xemacs-patches-bounces@xemacs.org" "Xemacs-patches") ("To"
" users@dba.openoffice.org" "OO-dba") ("Sender"
"preview-latex-devel-admin@lists.sourceforge.net" "Preview-latex")
("Sender" "linux-thinkpad-admin@linux-thinkpad.org" "Linux-thinkpad")
("From" "MA_Quimicas@mat.ucm.es" "Secrequi") ("From"
"Matematica_Aplicada@mat.ucm.es" "Secremat") (: setq
spam-use-BBDB-exclusive nil) (: spam-split (quote spam-use-BBDB)
(quote spam-use-stat) "SPAM.REAL") (: spam-split (quote
spam-use-regex-headers) "SPAM.POSS") (: setq spam-use-BBDB-exclusive t
fake-variable nil) (: spam-split (quote spam-use-BBDB) "SPAM.HAM") (:
setq spam-use-BBDB-exclusive nil) "MAILBOX")
which is wrong the new entry has to appear
after the | symbol
Or
(defun my:nnimap-generate-folder-list-from-bbdb ()
"Sets 'nnimap-folder-list to the result of
my:nnimap-folder-list-from-bbdb."
(interactive)
(add-to-list 'nnimap-split-fancy
(my:nnimap-folder-list-from-bbdb) 'append))
Which results in
`nnimap-split-fancy' is a variable declared in Lisp.
-- loaded from "nnimap"
Value: (| ("Subject" "POSIBLE SPAM" "SPAM.POSS") ("Subject"
".*\\[labest05\\].*" "Labest05") ("To" "xemacs-patches@xemacs.org"
"Xemacs-patches") ("Sender" "xemacs-patches-bounces@xemacs.org"
"Xemacs-patches") ("To" " users@dba.openoffice.org" "OO-dba")
("Sender" "preview-latex-devel-admin@lists.sourceforge.net"
"Preview-latex") ("Sender" "linux-thinkpad-admin@linux-thinkpad.org"
"Linux-thinkpad") ("From" "MA_Quimicas@mat.ucm.es" "Secrequi") ("From"
"Matematica_Aplicada@mat.ucm.es" "Secremat") (: setq
spam-use-BBDB-exclusive nil) (: spam-split (quote spam-use-BBDB)
(quote spam-use-stat) "SPAM.REAL") (: spam-split (quote
spam-use-regex-headers) "SPAM.POSS") (: setq spam-use-BBDB-exclusive t
fake-variable nil) (: spam-split (quote spam-use-BBDB) "SPAM.HAM") (:
setq spam-use-BBDB-exclusive nil) "MAILBOX" (("From"
"oub@mat\\.ucm\\.es" "testimap")))
Which is also bad, since it is the last entry.
or
(setq
nnimap-split-rule 'nnimap-split-fancy
nnimap-split-inbox "INBOX"
nnimap-split-fancy
'(|
(: my:nnimap-folder-list-from-bbdb)
("Subject" "POSIBLE SPAM" "SPAM.POSS")
("Subject" ".*\\[labest05\\].*" "Labest05") ;DAS IST ES!!!! Jan 27, 2005
13:34
("To" "xemacs-patches@xemacs.org" "Xemacs-patches") ;
("Sender" "xemacs-patches-bounces@xemacs.org" "Xemacs-patches") ;
("To" " users@dba.openoffice.org" "OO-dba") ;
("Sender" "preview-latex-devel-admin@lists.sourceforge.net" "Preview-latex")
;
("Sender" "linux-thinkpad-admin@linux-thinkpad.org" "Linux-thinkpad") ;
("From" "MA_Quimicas@mat.ucm.es" "Secrequi")
("From" "Matematica_Aplicada@mat.ucm.es" "Secremat")
(: setq spam-use-BBDB-exclusive nil)
(: spam-split 'spam-use-BBDB 'spam-use-stat "SPAM.REAL")
(: spam-split 'spam-use-regex-headers "SPAM.POSS") ;Version:1.10
(: setq spam-use-BBDB-exclusive t fake-variable nil)
(: spam-split 'spam-use-BBDB "SPAM.HAM")
(: setq spam-use-BBDB-exclusive nil)
"MAILBOX"))
That however gave an error I have attached below. (As I understand
there are to may parenthesis generated.)
I would appreciate any help on this subject. I think that function can
be really convenient.
Thanks
Uwe Brauer
imap-split-bbdb-bug
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- nnimap-generate-folder-list-from-bbdb, almost.,
Uwe Brauer <=