/[emacs]/emacs/lisp/gnus/nnvirtual.el
ViewVC logotype

Diff of /emacs/lisp/gnus/nnvirtual.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.2 by miles, Tue Oct 14 23:34:51 2003 UTC revision 1.7.2.3 by miles, Thu Sep 16 00:12:16 2004 UTC
# Line 1  Line 1 
1  ;;; nnvirtual.el --- virtual newsgroups access for Gnus  ;;; nnvirtual.el --- virtual newsgroups access for Gnus
2  ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002  ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
3  ;;        Free Software Foundation, Inc.  ;;        Free Software Foundation, Inc.
4    
5  ;; Author: David Moore <dmoore@ucsd.edu>  ;; Author: David Moore <dmoore@ucsd.edu>
6  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>  ;;      Lars Magne Ingebrigtsen <larsi@gnus.org>
7  ;;      Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>  ;;      Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
8  ;; Keywords: news  ;; Keywords: news
9    
10  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
# Line 45  Line 45 
45  (nnoo-declare nnvirtual)  (nnoo-declare nnvirtual)
46    
47  (defvoo nnvirtual-always-rescan t  (defvoo nnvirtual-always-rescan t
48    "*If non-nil, always scan groups for unread articles when entering a group.    "If non-nil, always scan groups for unread articles when entering a group.
49  If this variable is nil and you read articles in a component group  If this variable is nil and you read articles in a component group
50  after the virtual group has been activated, the read articles from the  after the virtual group has been activated, the read articles from the
51  component group will show up when you enter the virtual group.")  component group will show up when you enter the virtual group.")
52    
53  (defvoo nnvirtual-component-regexp nil  (defvoo nnvirtual-component-regexp nil
54    "*Regexp to match component groups.")    "Regexp to match component groups.")
55    
56  (defvoo nnvirtual-component-groups nil  (defvoo nnvirtual-component-groups nil
57    "Component group in this nnvirtual group.")    "Component group in this nnvirtual group.")
# Line 374  component group will show up when you en Line 374  component group will show up when you en
374                                #'(lambda (article)                                #'(lambda (article)
375                                    (nnvirtual-reverse-map-article                                    (nnvirtual-reverse-map-article
376                                     group article))                                     group article))
377                                (gnus-group-expire-articles-1 group)))))                                (gnus-uncompress-range
378      (sort unexpired '<)))                                 (gnus-group-expire-articles-1 group))))))
379        (sort (delq nil unexpired) '<)))
380    
381    
382  ;;; Internal functions.  ;;; Internal functions.
# Line 425  component group will show up when you en Line 426  component group will show up when you en
426             (concat (regexp-quote (gnus-group-real-name group)) ":[0-9]+")             (concat (regexp-quote (gnus-group-real-name group)) ":[0-9]+")
427             nil t)             nil t)
428        (replace-match "" t t))        (replace-match "" t t))
429      (unless (= (point) (point-max))      (unless (eobp)
430        (insert " ")        (insert " ")
431        (when (not (string= "" prefix))        (when (not (string= "" prefix))
432          (while (re-search-forward "[^ ]+:[0-9]+" nil t)          (while (re-search-forward "[^ ]+:[0-9]+" nil t)
# Line 520  If UPDATE-P is not nil, call gnus-group- Line 521  If UPDATE-P is not nil, call gnus-group-
521    
522    
523  ;;; We map between virtual articles and real articles in a manner  ;;; We map between virtual articles and real articles in a manner
524  ;;; which keeps the size of the virtual active list the same as  ;;; which keeps the size of the virtual active list the same as the
525  ;;; the sum of the component active lists.  ;;; sum of the component active lists.
 ;;; To achieve fair mixing of the groups, the last article in  
 ;;; each of N component groups will be in the last N articles  
 ;;; in the virtual group.  
526    
527  ;;; If you have 3 components A, B and C, with articles 1-8, 1-5, and 6-7  ;;; To achieve fair mixing of the groups, the last article in each of
528  ;;; respectively, then the virtual article numbers look like:  ;;; N component groups will be in the last N articles in the virtual
529    ;;; group.
530    
531    ;;; If you have 3 components A, B and C, with articles 1-8, 1-5, and
532    ;;; 6-7 respectively, then the virtual article numbers look like:
533  ;;;  ;;;
534  ;;;  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15  ;;;  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
535  ;;;  A1 A2 A3 A4 B1 A5 B2 A6 B3 A7 B4 C6 A8 B5 C7  ;;;  A1 A2 A3 A4 B1 A5 B2 A6 B3 A7 B4 C6 A8 B5 C7

Legend:
Removed from v.1.7.2.2  
changed lines
  Added in v.1.7.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26