(nntp-server-buffer (current-buffer))
(nntp-have-messaged nil)
(tries 0))
- (condition-case nil
- ;; FIXME: we could stop waiting after some
- ;; timeout, but this is the wrong place to do it.
- ;; rather than checking time-spent-waiting, we
- ;; should check time-since-last-output, which
- ;; needs to be done in nntp.el.
- (while (eq article gnus-async-current-prefetch-article)
- (incf tries)
- (when (nntp-accept-process-output proc)
- (setq tries 0))
- (when (and (not nntp-have-messaged)
- (= tries 3))
- (gnus-message 5 "Waiting for async article...")
- (setq nntp-have-messaged t)))
- (quit
- ;; if the user interrupted on a slow/hung connection,
- ;; do something friendly.
- (when (> tries 3)
- (setq gnus-async-current-prefetch-article nil))
- (signal 'quit nil)))
- (when nntp-have-messaged
- (gnus-message 5 "")))))
+ (when proc
+ (condition-case nil
+ ;; FIXME: we could stop waiting after some
+ ;; timeout, but this is the wrong place to do it.
+ ;; rather than checking time-spent-waiting, we
+ ;; should check time-since-last-output, which
+ ;; needs to be done in nntp.el.
+ (while (eq article gnus-async-current-prefetch-article)
+ (incf tries)
+ (when (nntp-accept-process-output proc)
+ (setq tries 0))
+ (when (and (not nntp-have-messaged)
+ (= tries 3))
+ (gnus-message 5 "Waiting for async article...")
+ (setq nntp-have-messaged t)))
+ (quit
+ ;; if the user interrupted on a slow/hung connection,
+ ;; do something friendly.
+ (when (> tries 3)
+ (setq gnus-async-current-prefetch-article nil))
+ (signal 'quit nil)))
+ (when nntp-have-messaged
+ (gnus-message 5 ""))))))
(defun gnus-async-delete-prefetched-entry (entry)
"Delete ENTRY from buffer and alist."
(gnus-get-unread-articles arg))
(let ((gnus-read-active-file (if arg nil gnus-read-active-file)))
(gnus-get-unread-articles arg)))
+ (gnus-check-reasonable-setup)
(gnus-run-hooks 'gnus-after-getting-new-news-hook)
(gnus-group-list-groups (and (numberp arg)
(max (car gnus-group-list-mode) arg))))
(symbol-value 'nnimap-mailbox-info)
(make-vector 1 0)))))
+(defun gnus-check-reasonable-setup ()
+ ;; Check whether nnml and nnfolder share a directory.
+ (let ((actives nil))
+ (dolist (server gnus-server-alist)
+ (let* ((method (gnus-server-to-method server))
+ (active (intern (format "%s-active-file" (car method))))
+ match)
+ (when (and (member (car method) '(nnml nnfolder))
+ (gnus-server-opened method)
+ (boundp active))
+ (when (setq match (assoc (symbol-value active) actives))
+ (display-warning
+ :warning (format "%s and %s share the same active file %s"
+ (car method)
+ (cadr match)
+ (car match))))
+ (push (list (symbol-value active) method) actives))))))
(provide 'gnus-start)
gnus-start-date-timer gnus-stop-date-timer)
("gnus-int" gnus-request-type)
("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
- gnus-dribble-enter gnus-read-init-file gnus-dribble-touch)
+ gnus-dribble-enter gnus-read-init-file gnus-dribble-touch
+ gnus-check-reasonable-setup)
("gnus-dup" gnus-dup-suppress-articles gnus-dup-unsuppress-article
gnus-dup-enter-articles)
("gnus-range" gnus-copy-sequence)