aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2008-01-28 03:51:31 +0000
committerMiles Bader2008-01-28 03:51:31 +0000
commita1da1e372a7a671153a226d08e9b7ae4b2225196 (patch)
tree9a4451f88c7ebb8060181925839f520b393cf34a
parent0975aa2475b2691bcb646d56cb3be39f01843ef2 (diff)
downloademacs-a1da1e372a7a671153a226d08e9b7ae4b2225196.tar.gz
emacs-a1da1e372a7a671153a226d08e9b7ae4b2225196.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1016
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/gnus.texi26
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/mail-source.el2
-rw-r--r--lisp/gnus/nnmail.el27
5 files changed, 63 insertions, 5 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 3c179467fa2..d4710db0675 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12008-01-28 Michael Sperber <sperber@deinprogramm.de>
2
3 * gnus.texi (Mail Source Specifiers): Document `group' specifier.
4 (Group Parameters): Document `mail-source' parameter.
5
12008-01-27 Michael Albinus <michael.albinus@gmx.de> 62008-01-27 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * tramp.texi (Inline methods): The hostname of the su(do)? methods 8 * tramp.texi (Inline methods): The hostname of the su(do)? methods
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index ba61fd72247..f90b0f96847 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -3035,6 +3035,12 @@ to.
3035If it is set, the value is used as the method for posting message 3035If it is set, the value is used as the method for posting message
3036instead of @code{gnus-post-method}. 3036instead of @code{gnus-post-method}.
3037 3037
3038@item mail-source
3039@cindex mail-source
3040If it is set, and the setting of @code{mail-sources} includes a
3041@code{group} mail source (@pxref{Mail Sources}), the value is a
3042mail source for this group.
3043
3038@item banner 3044@item banner
3039@cindex banner 3045@cindex banner
3040An item like @code{(banner . @var{regexp})} causes any part of an article 3046An item like @code{(banner . @var{regexp})} causes any part of an article
@@ -14145,6 +14151,21 @@ element is a @dfn{mail source type}, followed by an arbitrary number of
14145@dfn{keywords}. Keywords that are not explicitly specified are given 14151@dfn{keywords}. Keywords that are not explicitly specified are given
14146default values. 14152default values.
14147 14153
14154The @code{mail-sources} is global for all mail groups. You can specify
14155an additional mail source for a particular group by including the
14156@code{group} mail specifier in @code{mail-sources}, and setting a
14157@code{mail-source} group parameter (@pxref{Group Parameters}) specifying
14158a single mail source. When this is used, @code{mail-sources} is
14159typically just @code{(group)}; the @code{mail-source} parameter for a
14160group might look like this:
14161
14162@lisp
14163(mail-source . (file :path "home/user/spools/foo.spool"))
14164@end lisp
14165
14166This means that the group's (and only this group's) messages will be
14167fetched from the spool file @samp{/user/spools/foo.spool}.
14168
14148The following mail source types are available: 14169The following mail source types are available:
14149 14170
14150@table @code 14171@table @code
@@ -14535,6 +14556,11 @@ An example webmail source:
14535 :user "user-name" 14556 :user "user-name"
14536 :password "secret") 14557 :password "secret")
14537@end lisp 14558@end lisp
14559
14560@item group
14561Get the actual mail source from the @code{mail-source} group parameter,
14562@xref{Group Parameters}.
14563
14538@end table 14564@end table
14539 14565
14540@table @dfn 14566@table @dfn
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 35347c8e71a..94a976c8e65 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12008-01-24 Michael Sperber <sperber@deinprogramm.de>
2
3 * mail-source.el (mail-sources): Add `group' choice.
4
5 * nnmail.el (nnmail-get-new-mail-1): Abstract this out to add another
6 parameter `in-group' to control into which group the articles go.
7 Add treatment of `group' mail-source.
8
12008-01-24 Dan Nicolaescu <dann@ics.uci.edu> 92008-01-24 Dan Nicolaescu <dann@ics.uci.edu>
2 10
3 * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at): 11 * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at):
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 9f9f9733110..01463c55628 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -74,6 +74,8 @@ See Info node `(gnus)Mail Source Specifiers'."
74 (repeat :tag "List" 74 (repeat :tag "List"
75 (choice :format "%[Value Menu%] %v" 75 (choice :format "%[Value Menu%] %v"
76 :value (file) 76 :value (file)
77 (cons :tag "Group parameter `mail-source'"
78 (const :format "" group))
77 (cons :tag "Spool file" 79 (cons :tag "Spool file"
78 (const :format "" file) 80 (const :format "" file)
79 (checklist :tag "Options" :greedy t 81 (checklist :tag "Options" :greedy t
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index f0f90218aab..a6ed7190351 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1766,11 +1766,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1766 (symbol-value sym)))) 1766 (symbol-value sym))))
1767 1767
1768(defun nnmail-get-new-mail (method exit-func temp 1768(defun nnmail-get-new-mail (method exit-func temp
1769 &optional group spool-func) 1769 &optional group spool-func)
1770 "Read new incoming mail." 1770 "Read new incoming mail."
1771 (nnmail-get-new-mail-1 method exit-func temp group nil spool-func))
1772
1773(defun nnmail-get-new-mail-1 (method exit-func temp
1774 group in-group spool-func)
1775
1771 (let* ((sources mail-sources) 1776 (let* ((sources mail-sources)
1772 fetching-sources 1777 fetching-sources
1773 (group-in group)
1774 (i 0) 1778 (i 0)
1775 (new 0) 1779 (new 0)
1776 (total 0) 1780 (total 0)
@@ -1778,6 +1782,18 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1778 (when (and (nnmail-get-value "%s-get-new-mail" method) 1782 (when (and (nnmail-get-value "%s-get-new-mail" method)
1779 sources) 1783 sources)
1780 (while (setq source (pop sources)) 1784 (while (setq source (pop sources))
1785
1786 ;; Use group's parameter
1787 (when (eq (car source) 'group)
1788 (let ((mail-sources
1789 (list
1790 (gnus-group-find-parameter
1791 (concat (symbol-name method) ":" group)
1792 'mail-source t))))
1793 (nnmail-get-new-mail-1 method exit-func temp
1794 group group spool-func))
1795 (setq source nil))
1796
1781 ;; Hack to only fetch the contents of a single group's spool file. 1797 ;; Hack to only fetch the contents of a single group's spool file.
1782 (when (and (eq (car source) 'directory) 1798 (when (and (eq (car source) 'directory)
1783 (null nnmail-scan-directory-mail-source-once) 1799 (null nnmail-scan-directory-mail-source-once)
@@ -1816,9 +1832,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1816 (nnmail-split-incoming 1832 (nnmail-split-incoming
1817 file ',(intern (format "%s-save-mail" method)) 1833 file ',(intern (format "%s-save-mail" method))
1818 ',spool-func 1834 ',spool-func
1819 (if (equal file orig-file) 1835 (or in-group
1820 nil 1836 (if (equal file orig-file)
1821 (nnmail-get-split-group orig-file ',source)) 1837 nil
1838 (nnmail-get-split-group orig-file ',source)))
1822 ',(intern (format "%s-active-number" method))))))) 1839 ',(intern (format "%s-active-number" method)))))))
1823 (incf total new) 1840 (incf total new)
1824 (incf i))) 1841 (incf i)))