Commit a8b466fa authored by David Byers's avatar David Byers
Browse files

Commands:

kom-change-priority to change priority of membership
kom-add-self does not ask priority if we are passive in the conference

Bug fixes:
Parser reads err-stat
REVIEW-TREE is added to lyskom-to-do-list
parent d4a70fae
1999-08-13 David Byers <davby@ida.liu.se>
* commands1.el (lyskom-try-add-member): Added optional message
string.
(kom-change-priority): New user-level command.
(kom-add-self): Don't ask about priority when reentering a
conference we are passive members of.
* vars.el.in (lyskom-err-stat): New variable.
* parse.el (lyskom-parse-error): Set lyskom-err-stat from parsed
error.
* view-text.el (lyskom-follow-comments): Enter REVIEW-TREE into
both lyskom-reading-list and lyskom-to-do-list using
lyskom-review-enter-read-info.
1999-08-09 David Byers <davby@ida.liu.se>
* edit-text.el (lyskom-create-text-handler): Changed name of
......
......@@ -7,12 +7,9 @@ Att g
listan, glöm inte att ta bort det från listan!
Oops. Vi visar creating-software som en tom rad i headern för texten.
Se tiden borde kunna visa veckonummer.
Se tiden borde kunna visa veckonummer.
Om man går med i ett möte man är passiv i så borde man inte få frågan
om prioritet etc.
Kolla strängar där noll är passivt medlemskap.
......
......@@ -338,14 +338,44 @@ Ask for the name of the person, the conference to add him/her to."
(def-kom-command kom-add-self (&optional conf)
"Add this person as a member of a conference."
(interactive)
(let ((whereto (if conf (blocking-do 'get-conf-stat conf)
(lyskom-read-conf-stat
(lyskom-get-string 'where-to-add-self)
'(all) nil "" t)))
(who (blocking-do 'get-conf-stat lyskom-pers-no))
(pers-stat (blocking-do 'get-pers-stat lyskom-pers-no)))
(lyskom-add-member-answer (lyskom-try-add-member whereto who pers-stat nil)
whereto who)))
(let* ((whereto (if conf (blocking-do 'get-conf-stat conf)
(lyskom-read-conf-stat
(lyskom-get-string 'where-to-add-self)
'(all) nil "" t)))
(who (blocking-do 'get-conf-stat lyskom-pers-no))
(pers-stat (blocking-do 'get-pers-stat lyskom-pers-no))
(mship (lyskom-get-membership (conf-stat->conf-no whereto) t)))
;; Fake kom-membership-default-priority if this is a passive membership
;; This will suppress the normal "which priority" question. Ugly hack.
(let ((kom-membership-default-priority
(if (and mship (membership-type->passive (membership->type mship)))
(membership->priority mship)
kom-membership-default-priority)))
(lyskom-add-member-answer (lyskom-try-add-member whereto who pers-stat nil)
whereto who))))
(def-kom-command kom-change-priority (&optional conf)
"Change the priority of a conference."
(interactive)
(let* ((conf-stat (if conf (blocking-do 'get-conf-stat conf)
(lyskom-read-conf-stat
(lyskom-get-string 'change-priority-for-q)
'(all) nil "" t)))
(mship (lyskom-get-membership (conf-stat->conf-no conf-stat) t)))
(blocking-do-multiple ((who (get-conf-stat lyskom-pers-no))
(pers-stat (get-pers-stat lyskom-pers-no)))
(cond ((null mship)
(lyskom-format-insert 'not-member-of-conf conf))
(t (lyskom-add-member-answer
(lyskom-try-add-member conf-stat who pers-stat nil
'change-priority-for)
conf-stat who))))))
......@@ -366,14 +396,19 @@ for person PERS-NO and send them into lyskom-try-add-member."
result)))
(defun lyskom-try-add-member (conf-conf-stat pers-conf-stat
pers-stat membership-type)
(defun lyskom-try-add-member (conf-conf-stat
pers-conf-stat
pers-stat
membership-type
&optional message-string)
"Add a member to a conference.
Args: CONF-CONF-STAT PERS-CONF-STAT PERS-STAT
CONF-CONF-STAT: the conf-stat of the conference the person is being added to
PERS-CONF-STAT: the conf-stat of the person being added.
PERS-STAT: the pers-stat of the person being added.
Optional MESSAGE-STRING is the message to print before making server call.
Returns t if it was possible, otherwise nil."
(if (or (null conf-conf-stat)
(null pers-conf-stat))
......@@ -410,13 +445,17 @@ Returns t if it was possible, otherwise nil."
(lyskom-create-membership-type nil nil nil nil
nil nil nil nil)))
(if (= (conf-stat->conf-no pers-conf-stat)
lyskom-pers-no)
(lyskom-format-insert 'member-in-conf
conf-conf-stat)
(lyskom-format-insert 'add-member-in
pers-conf-stat
conf-conf-stat))
(if message-string
(lyskom-format-insert message-string
pers-conf-stat
conf-conf-stat)
(if (= (conf-stat->conf-no pers-conf-stat)
lyskom-pers-no)
(lyskom-format-insert 'member-in-conf
conf-conf-stat)
(lyskom-format-insert 'add-member-in
pers-conf-stat
conf-conf-stat)))
(lyskom-ignoring-async (18 lyskom-pers-no
(conf-stat->conf-no conf-conf-stat))
(blocking-do 'add-member
......@@ -678,7 +717,7 @@ This does lyskom-end-of-command"
"Write a comment to a text.
If optional arg TEXT-NO is present write a comment to that text instead."
(interactive (list
(lyskom-read-text-no-prefix-arg 'what-comment-to)))
(lyskom-read-text-no-prefix-arg 'what-comment-no)))
(lyskom-start-of-command (concat
(lyskom-command-name 'kom-write-comment)
(if text-no
......@@ -1658,7 +1697,6 @@ If MARK-NO is nil, review all marked texts."
(elt (lyskom-get-string 'weekdays)
(time->wday time))))
(def-kom-command kom-display-time ()
"Ask server about time and date."
(interactive)
......
......@@ -1072,12 +1072,13 @@ CALL-INFO is destructively changed to
(set-buffer buffer)
(let* ((kom-queue (cdr (assq ref-no lyskom-pending-calls)))
(call-info (lyskom-locate-ref-no kom-queue ref-no))
errno)
errno err-stat)
(set-buffer lyskom-unparsed-buffer)
(setq errno (lyskom-parse-num))
(lyskom-parse-num) ;Skip ref_no.
(setq err-stat (lyskom-parse-num)) ;Skip ref_no.
(set-buffer buffer)
(setq lyskom-errno errno)
(setq lyskom-err-stat err-stat)
(setq lyskom-pending-calls
(lyskom-assoc-dremove ref-no lyskom-pending-calls))
(lyskom-decrease-pending-calls)
......
......@@ -352,6 +352,8 @@ du har l
(where-on-list-q . "Placering p listan? (0-%#1d) ")
(member-in-conf . "Bli medlem i %#1M...")
(add-member-in . "Addera %#1P som medlem i %#2M...")
(change-priority-for-q . "ndra prioritet fr mte: ")
(change-priority-for . "ndra prioritet p %#2M...")
(unsubscribe-to . "Uttrda ur %#1M...")
(exclude-from . "Utesluta %#1P frn %#2M...")
......@@ -1354,6 +1356,7 @@ Du m
(kom-status-person . "Status (fr) person")
(kom-status-conf . "Status (fr) mte")
(kom-add-self . "Bli medlem i mte")
(kom-change-priority . "ndra prioritet")
(kom-list-summary . "Lista renden")
(kom-sub-self . "Uttrda ur mte")
(kom-quit . "Sluta")
......
......@@ -1054,6 +1054,7 @@ Users are encouraged to use their best sense of humor."
kom-status-person
kom-status-conf
kom-add-self
kom-change-priority
kom-list-summary
kom-sub-self
kom-quit
......@@ -1278,6 +1279,10 @@ This is not buffer-local.")
"Errno of last lyskom error."
local)
(def-kom-var lyskom-err-stat nil
"Err-stat of last lyskom error."
local)
(def-kom-var lyskom-parse-pos nil
"Position of parsing.")
......
......@@ -294,12 +294,19 @@ lyskom-reading-list."
(not (lyskom-text-read-p text-stat))))
(setq comments (cons no comments)))))
(if comments
(read-list-enter-read-info
(lyskom-create-read-info (if review-tree 'REVIEW-TREE 'COMM-IN)
conf-stat priority
(lyskom-create-text-list comments)
(text-stat->text-no text-stat))
lyskom-reading-list t))
(if review-tree
(lyskom-review-enter-read-info
(lyskom-create-read-info 'REVIEW-TREE
conf-stat priority
(lyskom-create-text-list comments)
(text-stat->text-no text-stat)) t)
(read-list-enter-read-info
(lyskom-create-read-info 'COMM-IN
conf-stat priority
(lyskom-create-text-list comments)
(text-stat->text-no text-stat))
lyskom-reading-list t)))
;; Find the footnotes that we should read and enter them into
;; the read-list. A slight trick is to increase the priority so
;; that they will be read first.
......
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