Function: nndiary-renew-article-p

nndiary-renew-article-p is a byte-compiled function defined in nndiary.el.gz.

Signature

(nndiary-renew-article-p FILE TIMESTAMP)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nndiary.el.gz
(defun nndiary-renew-article-p (file timestamp)
  (erase-buffer)
  (if (nnheader-insert-head file)
      (let ((now (current-time))
	    (sched (nndiary-schedule)))
	;; The article should be re-considered as unread if there's a reminder
	;; between the group timestamp and the current time.
	(when (and sched (setq sched (nndiary-next-occurrence sched now)))
	  (let ((reminders ;; add the next occurrence itself at the end.
		 (append (nndiary-compute-reminders sched) (list sched))))
	    (while (and reminders (time-less-p (car reminders) timestamp))
	      (pop reminders))
	    ;; The reminders might be empty if the last date is in the past,
	    ;; or we've got at least the next occurrence itself left. All past
	    ;; dates are renewed.
	    (or (not reminders)
		(time-less-p (car reminders) now)))
	  ))
    ;; else
    (nnheader-report 'nndiary "Could not read file %s" file)
    nil))