Gnus development mailing list
 help / color / mirror / Atom feed
* display 'not-expired
@ 1997-12-04  0:24 Wes Hardaker
  1997-12-14 10:08 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Wes Hardaker @ 1997-12-04  0:24 UTC (permalink / raw)



A long time ago I made a rquest for something like a group param that
would allow you to display only articles without an exirory mark.  I
implemented it a long time ago (during a feature freeze) and thought I
should finally send it to you, so here it is.

How it is done:
As a group param:
  (display 'not-expired)

How it should be done:
  (display STRING)

where string is something like "-E" in this case.  Since I don't know
the function for converting marks to article numbers, I haven't done
this, and I just haven't had the time to go looking.  A string would
be much more flexible and could include only marks that someone
wanted (like "RO!"), or just the ones you don't want to see indicated
by a prepended '-' sign (like "-EO").

Wes

Index: gnus-cus.el
===================================================================
RCS file: /home/hardaker/src/cvsroot/qgnus/gnus-cus.el,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 gnus-cus.el
*** gnus-cus.el 1997/11/25 01:13:20     1.1.1.2
--- gnus-cus.el 1997/12/04 00:16:20
***************
*** 144,154 ****
--- 144,158 ----
      (display (choice :tag "Display"
                     :value default
                     (const all)
+                    (const not-expired)
                     (const default)) "\
  Which articles to display on entering the group.
  
  `all'
       Display all articles, both read and unread.
+ 
+ `not-expired'
+      All articles except those marked as expirable.
  
  `default'
       Display the default visible articles, which normally includes
Index: gnus-sum.el
===================================================================
RCS file: /home/hardaker/src/cvsroot/qgnus/gnus-sum.el,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 gnus-sum.el
*** gnus-sum.el 1997/11/26 18:47:13     1.1.1.5
--- gnus-sum.el 1997/11/26 19:06:56
***************
*** 3854,3871 ****
  
  (defun gnus-articles-to-read (group &optional read-all)
    ;; Find out what articles the user wants to read.
!   (let* ((articles
          ;; Select all articles if `read-all' is non-nil, or if there
          ;; are no unread articles.
!         (if (or read-all
!                 (and (zerop (length gnus-newsgroup-marked))
!                      (zerop (length gnus-newsgroup-unreads)))
!                 (eq (gnus-group-find-parameter group 'display)
!                     'all))
!             (gnus-uncompress-range (gnus-active group))
            (sort (append gnus-newsgroup-dormant gnus-newsgroup-marked
                          (copy-sequence gnus-newsgroup-unreads))
!                 '<)))
         (scored-list (gnus-killed-articles gnus-newsgroup-killed articles))
         (scored (length scored-list))
         (number (length articles))
--- 3854,3881 ----
  
  (defun gnus-articles-to-read (group &optional read-all)
    ;; Find out what articles the user wants to read.
!   (let* ((display (gnus-group-find-parameter group 'display))
!        tmparticles
!        (articles
          ;; Select all articles if `read-all' is non-nil, or if there
          ;; are no unread articles.
!         (cond 
!          ((or read-all
!               (and (zerop (length gnus-newsgroup-marked))
!                    (zerop (length gnus-newsgroup-unreads)))
!               (eq display 'all))
!           (gnus-uncompress-range (gnus-active group)))
!          ((eq display 'not-expired)
!           (setq articles (gnus-uncompress-range (gnus-active group)))
!           (setq tmparticles gnus-newsgroup-expirable)
!           (while (not (null tmparticles))
!           (setq articles (delq (car tmparticles) articles))
!           (setq tmparticles (cdr tmparticles)))
!           articles)
!          (t
            (sort (append gnus-newsgroup-dormant gnus-newsgroup-marked
                          (copy-sequence gnus-newsgroup-unreads))
!                 '<))))
         (scored-list (gnus-killed-articles gnus-newsgroup-killed articles))
         (scored (length scored-list))
         (number (length articles))


-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-02-13 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-04  0:24 display 'not-expired Wes Hardaker
1997-12-14 10:08 ` Lars Magne Ingebrigtsen
1997-12-15  1:53   ` Wes Hardaker
1997-12-19 20:21     ` Lars Magne Ingebrigtsen
1998-02-11 20:01       ` Wes Hardaker
1998-02-13 11:50         ` Lars Magne Ingebrigtsen
1998-02-13 17:18           ` Wes Hardaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).