Commit 50128cff authored by David Byers's avatar David Byers
Browse files

Fixed bugs 1174, 1213 and some problems I spotted on the way.

Detailed changes:
> 	Minor bug fixes:
> 	* commands2.el (kom-is-person-member-of-conference): When reading
> 	pers-to-check-mship-for, only read persons.
>
> 	* vars.el.in (lyskom-default-conference-strategy): Fixed typo in
> 	kom-move-text-tree.
>
> 	Fix bug 1174:
> 	* commands2.el (kom-join-all-conferences): Ask about receiving
> 	group messages in all conferences.
>
> 	* commands1.el (lyskom-add-member-answer): Added mship-type
> 	parameter.
> 	(lyskom-add-member-by-no): Added mship-type parameter.
> 	(kom-create-conf): Added mship-type parameter in call to
> 	lyskom-add-member-by-no
>
> 	Fix bug 1213:
> 	* commands1.el (lyskom-write-text): Handle argument correctly so
> 	both prefix arguments and menus work properly.
> 	(lyskom-add-member-answer): Added mship-type parameter
>
parent 1097cc30
2003-11-17 David Byers <byers@lysator.liu.se>
Minor bug fixes:
* commands2.el (kom-is-person-member-of-conference): When reading
pers-to-check-mship-for, only read persons.
* vars.el.in (lyskom-default-conference-strategy): Fixed typo in
kom-move-text-tree.
Fix bug 1174:
* commands2.el (kom-join-all-conferences): Ask about receiving
group messages in all conferences.
* commands1.el (lyskom-add-member-answer): Added mship-type
parameter.
(lyskom-add-member-by-no): Added mship-type parameter.
(kom-create-conf): Added mship-type parameter in call to
lyskom-add-member-by-no
Fix bug 1213:
* commands1.el (lyskom-write-text): Handle argument correctly so
both prefix arguments and menus work properly.
(lyskom-add-member-answer): Added mship-type parameter
Fix bug 1132:
* commands2.el (lyskom-list-new-conferences): Made this function
asynchronous. Use lyskom-get-conf-stat since there's a good
......
......@@ -622,7 +622,7 @@ the priority of several memberships, use `kom-prioritize' instead."
;;; NOTE: This function is also called from lyskom-go-to-conf-handler
;;; and from lyskom-create-conf-handler.
(defun lyskom-add-member-by-no (conf-no pers-no &optional no-of-unread thendo &rest data)
(defun lyskom-add-member-by-no (conf-no pers-no &optional no-of-unread mship-type thendo &rest data)
"Fetch info to be able to add a person to a conf.
Get the conf-stat CONF-NO for the conference and the conf-stat and pers-stat
for person PERS-NO and send them into lyskom-try-add-member."
......@@ -631,7 +631,7 @@ for person PERS-NO and send them into lyskom-try-add-member."
(pers-stat (get-pers-stat pers-no)))
(let ((result (lyskom-try-add-member whereto who pers-stat
nil nil t nil no-of-unread)))
(lyskom-add-member-answer result whereto who no-of-unread)
(lyskom-add-member-answer result whereto who no-of-unread mship-type)
(if thendo
(apply thendo data))
(car result))))
......@@ -762,7 +762,9 @@ If optional USE-PRIORITY is non-nil then use that as the priority.
(defun lyskom-add-member-answer (answer
conf-conf-stat
pers-conf-stat
&optional no-of-unread)
&optional
no-of-unread
mship-type)
"Handle the result from an attempt to add a member to a conference."
(let ((pos (if (consp answer) (elt answer 1) nil))
(answer (if (consp answer) (elt answer 0) answer)))
......@@ -797,15 +799,21 @@ If optional USE-PRIORITY is non-nil then use that as the priority.
(t (lyskom-insert-error errno err-stat)))))
(when (and (eq (conf-stat->conf-no pers-conf-stat)
lyskom-pers-no)
(lyskom-j-or-n-p
(lyskom-format 'set-message-flag-q conf-conf-stat)))
(blocking-do 'set-membership-type
(conf-stat->conf-no pers-conf-stat)
(conf-stat->conf-no conf-conf-stat)
(lyskom-create-membership-type nil nil nil t
nil nil nil nil)))
(cond (mship-type
(blocking-do 'set-membership-type
(conf-stat->conf-no pers-conf-stat)
(conf-stat->conf-no conf-conf-stat)
mship-type))
((and (eq (conf-stat->conf-no pers-conf-stat)
lyskom-pers-no)
(lyskom-j-or-n-p
(lyskom-format 'set-message-flag-q conf-conf-stat)))
(blocking-do 'set-membership-type
(conf-stat->conf-no pers-conf-stat)
(conf-stat->conf-no conf-conf-stat)
(lyskom-create-membership-type nil nil nil t
nil nil nil nil))))
(cache-del-pers-stat (conf-stat->conf-no pers-conf-stat))
(cache-del-conf-stat (conf-stat->conf-no conf-conf-stat))
......@@ -1013,6 +1021,7 @@ probably a general Q&A conference where you can ask."
(lyskom-add-member-by-no conf-no
lyskom-pers-no
nil
nil
(if secret
nil ; Don't write a presentation
'lyskom-create-conf-handler-2)
......@@ -1811,9 +1820,14 @@ recipients are handled."
(defun lyskom-write-text (arg prompt)
"Start writing a new text."
(lyskom-nag-about-presentation)
(let* ((tono (if (and arg lyskom-current-conf (not (zerop lyskom-current-conf)))
lyskom-current-conf
(lyskom-read-conf-no prompt '(pers conf) nil nil t)))
(let* ((tono (cond ((and arg (listp arg)
lyskom-current-conf
(not (eq 0 lyskom-current-conf)))
lyskom-current-conf)
((numberp arg) arg)
(t (lyskom-read-conf-no prompt '(pers conf) nil nil t))))
(conf-stat (blocking-do 'get-conf-stat tono)))
(cache-del-conf-stat tono)
(if (if (zerop (conf-stat->msg-of-day conf-stat))
......
......@@ -2635,7 +2635,7 @@ See `kom-keep-alive' for more information."
(let* ((pers-no
(or pers-no
(lyskom-read-conf-no 'pers-to-check-mship-for
'(all) nil nil t)))
'(pers) nil nil t)))
(conf-stat
(if conf-no
(blocking-do 'get-conf-stat conf-no)
......@@ -3336,6 +3336,11 @@ is probably not what you really want to do."
(not (lyskom-j-or-n-p
(lyskom-format 'no-confirm-each-sure
(length conf-nos))))))
(mship-type (unless (lyskom-j-or-n-p 'confirm-each-msg)
(lyskom-create-membership-type
nil nil nil (lyskom-j-or-n-p 'receive-each-msg)
nil nil nil nil)))
(no-of-unread (lyskom-read-num-range-or-date
0
lyskom-max-int
......@@ -3352,7 +3357,8 @@ is probably not what you really want to do."
(and confirm-each
(not (lyskom-j-or-n-p (lyskom-format 'confirm-join
(car conf-nos))))))
(lyskom-add-member-by-no (car conf-nos) lyskom-pers-no no-of-unread))
(lyskom-add-member-by-no (car conf-nos) lyskom-pers-no
no-of-unread mship-type))
(setq conf-nos (cdr conf-nos)))))
......
......@@ -454,7 +454,9 @@ and you have finished reading. Please come back later.
(change-priority-for . "Changing priority of %#2M...")
(unsubscribe-to . "Leaving %#1M...")
(unsubscribe-to-2 . "Leaving %#1M%#2s...")
(confirm-each-join . "Confirm joining each individual conference? ")
(confirm-each-join . "Confirm joining individual conferences? ")
(confirm-each-msg . "Confirm reception of group messages in individual mten? ")
(receive-each-msg . "Do you want to receive group messages in all conferences? ")
(no-confirm-each-sure . "Are you sure you want to join %#1d conferences automatically? ")
(confirm-join . "Join %#1M? ")
(getting-all-confs . "Getting a list of all conferences...")
......
......@@ -444,7 +444,9 @@ du har l
(change-priority-for . "ndra prioritet p %#2M...")
(unsubscribe-to . "Uttrda ur %#1M...")
(unsubscribe-to-2 . "Uttrda ur %#1M%#2s...")
(confirm-each-join . "Vill du bekrfta medlemskap i varje enskilt mte? ")
(confirm-each-join . "Vill du bekrfta medlemskap i enskila mten? ")
(confirm-each-msg . "Vill du bekrfta mottagande av gruppmeddelande i enskila mten? ")
(receive-each-msg . "Vill du ta emot gruppmeddelande i alla mten? ")
(no-confirm-each-sure . "r du helt sker p att du vill g med i %#1d mten automatiskt? ")
(confirm-join . "G med i %#1M? ")
(getting-all-confs . "Hmtar en lista med alla mten...")
......
......@@ -347,7 +347,7 @@ the priority among links that match the same text is undefined."
(who-to-move-to-or-sub-q
(default . ((lyskom-default-conference-saved last-added-rcpt)
lyskom-default-conference-current))
(save last added-rcpt))
(save last-added-rcpt))
(who-to-move-to-q
(default . ((lyskom-default-conference-saved last-added-rcpt)
lyskom-default-conference-current))
......@@ -356,6 +356,10 @@ the priority among links that match the same text is undefined."
(kom-send-message (who-to-send-message-to
(default . (lyskom-default-conference-for-send-message))))
(kom-is-person-member-of-conference (pers-to-check-mship-for)
(conf-to-check-mship-of))
;; Defaults and commands that use the defaults
......@@ -385,7 +389,6 @@ the priority among links that match the same text is undefined."
(kom-set-garb-nice (conf-to-set-garb-nice-q))
(kom-set-super-conf (conf-to-set-super-conf-q) (new-super-conf-q))
(kom-set-personal-label (label-what-pers) (label-what-conf))
(kom-is-person-member-of-conference (pers-to-check-mship-for) (conf-to-check-mship-of))
(kom-will-person-read-text (pers-to-check-will-read-for))
(kom-create-aux-item (which-conf-to-add-aux-to))
(kom-recommend-conference (recommend-which-conf))
......
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