Commit 1097cc30 authored by David Byers's avatar David Byers
Browse files

Fixed bug 1132. Fixed bug 1140 and similar problems. Minor bug fixes.

Detailed changes:
> 2003-11-17  David Byers  <byers@lysator.liu.se>
>
> 	Fix bug 1132:
> 	* commands2.el (lyskom-list-new-conferences): Made this function
> 	asynchronous. Use lyskom-get-conf-stat since there's a good
> 	chance, shortly after release at any rate, that this command will
> 	cause an explosion of get-conf-stats anyway (when the client gets
> 	the conf-stat in order to display the presentation status).
>
> 2003-11-14  David Byers  <byers@lysator.liu.se>
>
> 	Fix bug 1140:
> 	* vars.el.in (kom-pick-text-no-strategy-alist): Added items to
> 	this list corresponding to commands that have non-standard
> 	defaults, since these were ignored.
>
> 	* faqs.el (kom-add-faq): Don't pass DEFAULT to
> 	lyskom-read-text-no-prefix-arg (the default made little sense
> 	anyway).
> 	(kom-add-server-faq): Same here.
>
> 	* commands1.el (kom-set-presentation): Don't pass DEFAULT to
> 	lyskom-read-text-no-prefix-arg (the default made little sense
> 	anyway).
> 	(kom-set-motd-text): Same here.
>
> 2003-09-21  David Byers  <byers@lysator.liu.se>
>
> 	* commands1.el (lyskom-read-mark-type): Improve handling of empty
> 	string entered as mark type.
>
> 2003-09-17  David Byers  <byers@lysator.liu.se>
>
> 	* cache.el (lyskom-tell-server): Never, ever, send nil to
> 	change-what-i-am-doing since this causes a protocol error.
>
parent f1560739
2003-11-17 David Byers <byers@lysator.liu.se>
Fix bug 1132:
* commands2.el (lyskom-list-new-conferences): Made this function
asynchronous. Use lyskom-get-conf-stat since there's a good
chance, shortly after release at any rate, that this command will
cause an explosion of get-conf-stats anyway (when the client gets
the conf-stat in order to display the presentation status).
2003-11-14 David Byers <byers@lysator.liu.se>
Fix bug 1140:
* vars.el.in (kom-pick-text-no-strategy-alist): Added items to
this list corresponding to commands that have non-standard
defaults, since these were ignored.
* faqs.el (kom-add-faq): Don't pass DEFAULT to
lyskom-read-text-no-prefix-arg (the default made little sense
anyway).
(kom-add-server-faq): Same here.
* commands1.el (kom-set-presentation): Don't pass DEFAULT to
lyskom-read-text-no-prefix-arg (the default made little sense
anyway).
(kom-set-motd-text): Same here.
2003-09-21 David Byers <byers@lysator.liu.se>
* commands1.el (lyskom-read-mark-type): Improve handling of empty
string entered as mark type.
2003-09-17 David Byers <byers@lysator.liu.se>
* cache.el (lyskom-tell-server): Never, ever, send nil to
change-what-i-am-doing since this causes a protocol error.
2003-10-26 Per Cederqvist <ceder@ceder.dyndns.org>
* lyskom-rest.el (kom-mark-unread): Fixed typos in doc string.
......
......@@ -313,6 +313,6 @@ CACHE is the name of the variable that points to the cache."
((equal string lyskom-what-i-am-doing))
(t
(setq lyskom-what-i-am-doing string)
(initiate-change-what-i-am-doing 'background nil string))))))
(initiate-change-what-i-am-doing 'background nil (or string "")))))))
(provide 'lyskom-cache)
......@@ -2289,11 +2289,11 @@ exist."
(setq mark ""))
(cond
;; Default completion.
((and nildefault
(stringp mark)
(string= mark ""))
((and nildefault (null mark))
(setq mark-type 'default))
((null mark))
;; Correct completion.
(mark-assoc
(setq mark-type (cdr mark-assoc)))
......@@ -2326,8 +2326,7 @@ exist."
(setq mark-type new-mark-type))))
;; Incorrect completion.
(t
(lyskom-insert 'erroneous-mark)))))
(t (lyskom-insert 'erroneous-mark)))))
(if (eq mark-type 'default)
nil
......
......@@ -3542,9 +3542,7 @@ was given."
"List conferences created since the last time this command
was given."
(interactive)
(let* ((result (make-collector))
(var (symbol-value varsym))
(count 0)
(let* ((var (symbol-value varsym))
(conf-no (or (car var) 1))
(last-conf-no (blocking-do 'first-unused-conf-no))
(time-string (condition-case nil
......@@ -3552,37 +3550,43 @@ was given."
'date-and-time (cdr var)))
(error nil))))
(cond ((null last-conf-no)
(lyskom-format-insert 'no-support-in-server))
((>= conf-no last-conf-no)
(lyskom-format-insert 'no-new-conferences
time-string (lyskom-get-string obj)))
(t
(lyskom-format-insert 'new-conferences-since
time-string (lyskom-get-string obj))
(while (< conf-no last-conf-no)
(initiate-get-uconf-stat 'main
(lambda (val result)
(and val (collector-push val result)))
conf-no result)
(setq conf-no (1+ conf-no)))
(lyskom-wait-queue 'main)
(lyskom-traverse conf (nreverse (collector->value result))
(when (funcall filter conf)
(setq count (1+ count))
(lyskom-format-insert "%5#1m %#2c %#1M\n"
conf
(lyskom-list-conf-membership-char
(uconf-stat->conf-no conf)))))
(when (or kom-auto-confirm-new-conferences
(lyskom-j-or-n-p (lyskom-format 'mark-confs-as-known
(lyskom-get-string obj)
count)))
(set varsym (cons conf-no (lyskom-current-client-time)))
(lyskom-save-options lyskom-buffer
nil
nil
nil))))))
(if (null last-conf-no)
(lyskom-format-insert 'no-support-in-server))
(let ((count (cons 0 (make-marker))))
(while (< conf-no last-conf-no)
(initiate-get-conf-stat
'main
(lambda (conf filter count time-string)
(when (and conf (funcall filter conf))
(when (eq (car count) 0)
(lyskom-format-insert 'new-conferences-since
time-string (lyskom-get-string obj)))
(rplaca count (1+ (car count)))
(lyskom-format-insert "%5#1m %#2c %#1M\n"
conf
(lyskom-list-conf-membership-char
(uconf-stat->conf-no conf)))
(set-marker (cdr count) (point))))
conf-no filter count time-string)
(setq conf-no (1+ conf-no)))
(lyskom-wait-queue 'main)
(when (marker-position (cdr count))
(goto-char (cdr count)))
(cond ((eq 0 (car count))
(lyskom-format-insert 'no-new-conferences
time-string (lyskom-get-string obj)))
(t
(when (or kom-auto-confirm-new-conferences
(lyskom-j-or-n-p (lyskom-format 'mark-confs-as-known
(lyskom-get-string obj)
(car count))))
(set varsym (cons conf-no (lyskom-current-client-time)))
(lyskom-save-options lyskom-buffer
nil
nil
nil)))))))
......
......@@ -85,7 +85,7 @@ This command accepts text number prefix arguments \(see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-conf-no 'conf-to-add-faq
'(conf pers) nil nil t)
(lyskom-read-text-no-prefix-arg 'text-to-add-as-faq nil 'last-seen-written)))
(lyskom-read-text-no-prefix-arg 'text-to-add-as-faq)))
(lyskom-add-faq conf-no text-no))
......@@ -97,7 +97,7 @@ a conference that doesn't have one, or change an existing FAQ, use
This command accepts text number prefix arguments \(see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-add-as-faq nil 'last-seen-written)))
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-add-as-faq)))
(lyskom-add-faq nil text-no))
......
......@@ -514,6 +514,14 @@ The format of this variable may change in the future.
(nil . lyskom-maybe-get-commented-text)))
(kom-sub-footnote . ((t . lyskom-maybe-get-footnoted-text)
(nil . lyskom-maybe-get-footnoted-text)))
(kom-write-footnote . ((t . lyskom-get-last-written-or-read-by-me)
(nil . lyskom-get-last-written-or-read-by-me)))
(kom-add-no-comments . ((t . lyskom-get-last-written-or-read-by-me)
(nil . lyskom-get-last-written-or-read-by-me)))
(kom-add-private-answer . ((t . lyskom-get-last-written-or-read-by-me)
(nil . lyskom-get-last-written-or-read-by-me)))
(kom-add-request-confirm . ((t . lyskom-get-last-written-or-read-by-me)
(nil . lyskom-get-last-written-or-read-by-me)))
(t . ((t . lyskom-get-text-at-point) ; default for prompts
(nil . lyskom-get-text-at-point) ; no prefix arg
(0 . lyskom-prompt-for-text-no)
......
Markdown is supported
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