Commit 88a66366 authored by David Byers's avatar David Byers
Browse files

Fixade off-by-one error i lyskom-fetch-start-of-map.

Endast går till lyskom-current-conf om det var där man gjorde endast
parent 0a8a1adc
2000-08-15 David Byers <>
* commands2.el (kom-set-unread): Immediately go to
lyskom-current-conf if that is the conf being changed.
* prefetch.el (lyskom-fetch-start-of-map): Fix off-by-one error in
map fetching.
* commands2.el (kom-set-unread): Use lyskom-fetch-start-of-map to
block until we see a text in the map of the conference we are
setting unread in.
* commands1.el (lyskom-add-member-answer): Block until we get at
least one text in the map or have read the entire map.
(lyskom-add-membership): Add parameter BLOCKING to allow blocking
......@@ -1228,14 +1228,15 @@ back on lyskom-to-do-list."
(lyskom-go-to-conf conf))))
(defun lyskom-go-to-conf (conf)
(defun lyskom-go-to-conf (conf &optional no-prompt)
"Go to the conference in CONF. CONF can be conf-no of conf-stat.
Allowed conferences are conferences and the mailboxes you are
member of."
member of.
If NO-PROMPT is non-nil, don't print message that we have gone to conf."
(if (numberp conf) (setq conf (blocking-do 'get-conf-stat conf)))
(let ((membership (lyskom-get-membership (conf-stat->conf-no conf) t)))
(lyskom-format-insert 'go-to-conf
(unless no-prompt
(lyskom-format-insert 'go-to-conf conf))
(let ((lyskom-inhibit-prefetch t))
......@@ -706,7 +706,10 @@ send. If DONTSHOW is non-nil, don't display the sent message."
(if (= conf-no lyskom-current-conf)
(set-read-list-empty lyskom-reading-list))
(read-list-delete-read-info conf-no lyskom-to-do-list)
(lyskom-prefetch-map conf-no membership)
(if (= conf-no lyskom-current-conf)
(progn (lyskom-fetch-start-of-map conf-stat membership)
(lyskom-go-to-conf lyskom-current-conf t))
(lyskom-prefetch-map conf-no membership))
......@@ -46,7 +46,7 @@
* XEmacs version 21.1 and 21.2
* Gnu Emacs version 19.34 [1]
* Gnu Emacs version 20.3 and newer
* Gnu Emacs version 20.5 and newer
[1] You'll have to replace the included custom package, and if you
use Gnus, you may have to update that as well.
......@@ -177,7 +177,7 @@ This is used to prevent the prefetch code to reenter itself.")
(defun lyskom-fetch-start-of-map (conf-stat membership)
"Block fetching map for MEMBERSHIP until we see a text.
Start the prefetch for the remainder of the map."
(let ((first-local (membership->last-text-read membership))
(let ((first-local (1+ (membership->last-text-read membership)))
(last-local (1- (+ (conf-stat->no-of-texts conf-stat)
(conf-stat->first-local-no conf-stat))))
(done nil))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment