+2000-06-28 13:52:57 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * lpath.el: Fbind image-size.
+
+2000-06-28 Simon Josefsson <simon@josefsson.org>
+
+ * nnimap.el (nnimap-split-rule): Update doc with extended syntax.
+ (nnimap-assoc-match): New function.
+ (nnimap-split-find-rule): Support extended syntax.
+
+2000-06-28 Simon Josefsson <simon@josefsson.org>
+
+ * nnimap.el (nnimap-open-connection): Use port stuff.
+
+ * gnus-util.el (gnus-netrc-machine): Add defaultport parameter,
+ document port and defaultport.
+
2000-06-27 Paul Stodghill <stodghil@CS.Cornell.EDU>
* gnus-agent.el (gnus-agent-synchronize): Kill flags buffer.
(forward-line 1))
(nreverse result)))))
-(defun gnus-netrc-machine (list machine &optional port)
- "Return the netrc values from LIST for MACHINE or for the default entry."
+(defun gnus-netrc-machine (list machine &optional port defaultport)
+ "Return the netrc values from LIST for MACHINE or for the default entry.
+If PORT specified, only return entries with matching port tokens.
+Entries without port tokens default to DEFAULTPORT."
(let ((rest list)
result)
(while list
(when result
(setq result (nreverse result))
(while (and result
- (not (equal (or port "nntp")
+ (not (equal (or port defaultport "nntp")
(or (gnus-netrc-get (car result) "port")
- "nntp"))))
+ defaultport "nntp"))))
(pop result))
(car result))))
find-coding-systems-for-charsets sc-cite-regexp
vcard-pretty-print image-type-available-p
put-image create-image display-graphic-p
- find-image insert-image
+ find-image insert-image image-size
make-overlay overlay-put make-symbolic-link))
(maybe-bind '(global-face-data
mark-active transient-mark-mode mouse-selection-click-count
url-generic-parse-url valid-image-instantiator-format-p
babel-fetch babel-wash sc-cite-regexp
put-image create-image display-graphic-p
- find-image insert-image
+ find-image insert-image image-size
vcard-pretty-print image-type-available-p
coding-system-get find-coding-system
find-coding-systems-for-charsets find-coding-systems-region
second is a regexp that nnimap will try to match on the header to find
a fit.
-The first element can also be a list. In that case, the first element
-is the server the second element is the group on that server in which
-the matching article will be stored.
-
The second element can also be a function. In that case, it will be
called narrowed to the headers with the first element of the rule as
the argument. It should return a non-nil value if it thinks that the
This variable can also have a function as its value, the function will
be called with the headers narrowed and should return a group where it
-thinks the article should be splitted to.")
+thinks the article should be splitted to. See `nnimap-split-fancy'.
+
+To allow for different split rules on different virtual servers, and
+even different split rules in different inboxes on the same server,
+the syntax of this variable have been extended along the lines of:
+
+(setq nnimap-split-rule
+ '((\"my1server\" (\".*\" ((\"ding\" \"ding@gnus.org\")
+ (\"junk\" \"From:.*Simon\")))
+ (\"my2server\" (\"INBOX\" nnimap-split-fancy))
+ (\"my[34]server\" (\".*\" ((\"private\" \"To:.*Simon\")
+ (\"junk\" my-junk-func)))))
+
+The virtual server name is in fact a regexp, so that the same rules
+may apply to several servers. In the example, the servers
+\"my3server\" and \"my4server\" both use the same rules. Similarly,
+the inbox string is also a regexp. The actual splitting rules are as
+before, either a function, or a list with group/regexp or
+group/function elements.")
(defvar nnimap-split-predicate "UNSEEN UNDELETED"
"The predicate used to find articles to split.
(imap-capability 'IMAP4rev1 nnimap-server-buffer))
(imap-close nnimap-server-buffer)
(nnheader-report 'nnimap "Server %s is not IMAP4 compliant" server))
- (let (list alist user passwd)
- (and (fboundp 'gnus-parse-netrc)
- (setq list (gnus-parse-netrc nnimap-authinfo-file)
- alist (or (and (gnus-netrc-get
- (gnus-netrc-machine list server) "machine")
- (gnus-netrc-machine list server))
- (gnus-netrc-machine list nnimap-address))
- user (gnus-netrc-get alist "login")
- passwd (gnus-netrc-get alist "password")))
+ (let* ((list (gnus-parse-netrc nnimap-authinfo-file))
+ (port (if nnimap-server-port
+ (int-to-string nnimap-server-port)
+ "imap"))
+ (alist (or (gnus-netrc-machine list server port "imap")
+ (gnus-netrc-machine list nnimap-address port "imap")))
+ (user (gnus-netrc-get alist "login"))
+ (passwd (gnus-netrc-get alist "password")))
(if (imap-authenticate user passwd nnimap-server-buffer)
(prog1
(push (list server nnimap-server-buffer)
(or nnimap-split-crosspost
(throw 'split-done to-groups))))))))))
+(defun nnimap-assoc-match (key alist)
+ (let (element)
+ (while (and alist (not element))
+ (if (string-match (car (car alist)) key)
+ (setq element (car alist)))
+ (setq alist (cdr alist)))
+ element))
+
(defun nnimap-split-find-rule (server inbox)
- nnimap-split-rule)
+ (if (listp (cadar nnimap-split-rule)) ;; extended format?
+ (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match
+ server nnimap-split-rule))))
+ nnimap-split-rule))
(defun nnimap-split-find-inbox (server)
(if (listp nnimap-split-inbox)
+2000-06-28 Simon Josefsson <simon@josefsson.org>
+
+ * gnus.texi (Splitting in IMAP): Update.
+
2000-05-19 15:18:32 Dmitry Yaitskov <dimas@home.com>
* message.texi (Reply): Doc fix.
\e$B;HMQ2DG=$K$J$C$F$$$J$$$+$.$j!":G=i$K9gCW$7$?5,B'$,\e(B "\e$B>!$A\e(B" \e$B$^$9!#Aj8_Ej9F\e(B
\e$B$r$7$F$$$k>l9g$O!"A4$F$N9gCW$7$?5,B'$,\e(B "\e$B>!$A\e(B" \e$B$^$9!#\e(B
+\e$B$3$NJQ?t$O$=$NCM$H$7$F4X?t$r;}$D$3$H$b$G$-$^$9!#$=$N4X?t$O5-;v$N%X%C%@$N\e(B
+\e$BItJ,$KHO0O$,69$a$i$l$?>uBV$G8F$P$l!"5-;v$N0\F0@h$@$H;W$&%0%k!<%W$rJV$9$b\e(B
+\e$B$N$G$J$1$l$P$J$j$^$;$s!#\e(B@code{nnimap-split-fancy} \e$B$r;2>H$7$F2<$5$$!#\e(B
+
\e$BJ,3d%3!<%I$OI,MW$J$i%a!<%k%\%C%/%9$r:n@.$7$^$9!#\e(B
+\e$B0[$J$k2>A[%5!<%P!<Kh$K0c$&J,3d$N5,B'$r;H$C$?$j!"$=$l$I$3$m$+F1$8%5!<%P!<\e(B
+\e$B$N0[$J$k\e(B inbox \e$BKh$K0c$&J,3d$N5,B'$r;H$&$3$H$,$G$-$k$h$&$K$9$k$?$a$K!"$3\e(B
+\e$B$NJQ?t$N9=J8$O0J2<$N$h$&$K3HD%$5$l$F$$$^$9!#\e(B
+
+@lisp
+(setq nnimap-split-rule
+ '(("my1server" (".*" (("ding" "ding@@gnus.org")
+ ("junk" "From:.*Simon")))
+ ("my2server" ("INBOX" nnimap-split-fancy))
+ ("my[34]server" (".*" (("private" "To:.*Simon")
+ ("junk" my-junk-func)))))
+@end lisp
+
+\e$B2>A[%5!<%P!<L>$O<B:]$K$O@55,I=8=$J$N$G!"F1$85,B'$r$$$/$D$+$N%5!<%P!<$KE,\e(B
+\e$BMQ$G$-$k$G$7$g$&!#$3$NNc$G$O%5!<%P!<\e(B @code{my3server} \e$B$H\e(B @code{my4server}
+\e$B$,F1$85,B'$r;H$$$^$9!#F1MM$K\e(B inbox \e$BJ8;zNs$b@55,I=8=$G$9!#>e5-$NJ,3d$N5,\e(B
+\e$BB'$N<BNc$O!"4X?t!"$^$?$O%0%k!<%W$N@55,I=8=$+%0%k!<%W$N4X?t!"$NN>J}$G$9!#\e(B
+
Nnmail \e$B$GBP1~$9$k$b$N\e(B: @code{nnmail-split-methods}.
@item nnimap-split-predicate
This variable can also have a function as its value, the function will
be called with the headers narrowed and should return a group where it
-thinks the article should be splitted to.
+thinks the article should be splitted to. See @code{nnimap-split-fancy}.
The splitting code tries to create mailboxes if it need too.
+To allow for different split rules on different virtual servers, and
+even different split rules in different inboxes on the same server,
+the syntax of this variable have been extended along the lines of:
+
+@lisp
+(setq nnimap-split-rule
+ '(("my1server" (".*" (("ding" "ding@@gnus.org")
+ ("junk" "From:.*Simon")))
+ ("my2server" ("INBOX" nnimap-split-fancy))
+ ("my[34]server" (".*" (("private" "To:.*Simon")
+ ("junk" my-junk-func)))))
+@end lisp
+
+The virtual server name is in fact a regexp, so that the same rules
+may apply to several servers. In the example, the servers
+@code{my3server} and @code{my4server} both use the same rules.
+Similarly, the inbox string is also a regexp. The actual splitting
+rules are as before, either a function, or a list with group/regexp or
+group/function elements.
+
Nnmail equivalent: @code{nnmail-split-methods}.
@item nnimap-split-predicate