Gnus development mailing list
 help / color / mirror / Atom feed
* new agent feature:  catchup undownloadable.
@ 1998-02-11 18:47 Wes Hardaker
  1998-02-13 11:41 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Wes Hardaker @ 1998-02-11 18:47 UTC (permalink / raw)



Patch below to make the regular catchup routines catch up
undownloadable subjects as well (I get tired of having to type 'J c'
before 'c'.

Side effect:  find-next-subject finds undownloadable ones too (it
probably should, since they are technically 'unread'.  Just because
you aren't able to read them doesn't mean you don't want to go there
to mark it for later downloading).

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

Index: gnus-sum.el
===================================================================
RCS file: /home/hardaker/src/cvsroot/qgnus/gnus-sum.el,v
retrieving revision 1.1.1.9
retrieving revision 1.5
diff -c -r1.1.1.9 -r1.5
*** gnus-sum.el	1998/02/11 17:52:07	1.1.1.9
--- gnus-sum.el	1998/02/11 18:44:23	1.5
***************
*** 766,771 ****
--- 766,776 ----
  The function is called with one parameter, the article header vector,
  which it may alter in any way.")
  
+ (defcustom gnus-next-unread-finds-undownloadable t
+   "*If non-nil, finding the next unread article finds undownloadables ones too."
+   :group 'gnus-summary-various
+   :type 'boolean)
+ 
  ;;; Internal variables
  
  (defvar gnus-scores-exclude-files nil)
***************
*** 2032,2037 ****
--- 2037,2045 ----
  (defmacro gnus-data-pseudo-p (data)
    `(consp (nth 3 ,data)))
  
+ (defmacro gnus-data-undownloaded-p (data)
+   `(= (nth 1 ,data) gnus-undownloaded-mark))
+ 
  (defmacro gnus-data-find (number)
    `(assq ,number gnus-newsgroup-data))
  
***************
*** 3872,3889 ****
  
  (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))
--- 3880,3907 ----
  
  (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))
***************
*** 4761,4767 ****
  		  (if unread
  		      (progn
  			(while arts
! 			  (when (gnus-data-unread-p (car arts))
  			    (setq result (car arts)
  				  arts nil))
  			  (setq arts (cdr arts)))
--- 4779,4788 ----
  		  (if unread
  		      (progn
  			(while arts
! 			  (when (or
! 				 (gnus-data-unread-p (car arts))
! 				 (and gnus-next-unread-finds-undownloadable
! 				  (gnus-data-undownloaded-p (car arts))))
  			    (setq result (car arts)
  				  arts nil))
  			  (setq arts (cdr arts)))
***************
*** 4784,4790 ****
  		(if unread
  		    (progn
  		      (while arts
! 			(when (gnus-data-unread-p (car arts))
  			  (setq result (car arts)
  				arts nil))
  			(setq arts (cdr arts)))
--- 4805,4814 ----
  		(if unread
  		    (progn
  		      (while arts
! 			(when (or
! 			       (gnus-data-unread-p (car arts))
! 			       (and gnus-next-unread-finds-undownloadable
! 				    (gnus-data-undownloaded-p (car arts))))
  			  (setq result (car arts)
  				arts nil))
  			(setq arts (cdr arts)))
***************
*** 5386,5392 ****
         (t
  	(let ((data gnus-newsgroup-data))
  	  (while (and data
! 		      (not (gnus-data-unread-p (car data))))
  	    (setq data (cdr data)))
  	  (when data
  	    (goto-char (gnus-data-pos (car data)))
--- 5410,5419 ----
         (t
  	(let ((data gnus-newsgroup-data))
  	  (while (and data
! 		      (not (or
! 			    (gnus-data-unread-p (car data))
! 			    (and gnus-next-unread-finds-undownloadable
! 				 (gnus-data-undownloaded-p (car data))))))
  	    (setq data (cdr data)))
  	  (when data
  	    (goto-char (gnus-data-pos (car data)))


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-11 18:47 new agent feature: catchup undownloadable Wes Hardaker
1998-02-13 11:41 ` Lars Magne Ingebrigtsen
1998-02-13 17:22   ` 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).