Commit 664b6aa5 authored by David Byers's avatar David Byers
Browse files

Made initial value for reading confs more configurable.

Detailed changes:
> 2003-08-17  David Byers  <byers@lysator.liu.se>
>
> 	Make initial value for reading confs more configurable:
> 	* filter.el (kom-filter-author): Simplified. Initial values are
> 	now computed in completing-read.el, not here.
>
> 	* completing-read.el (lyskom-read-conf-guess-initial): Added
> 	PROMPT parameter.
> 	(lyskom-get-initial-conf-strategy): Added PROMPT parameter.
> 	Operate on new format. Combine prompt-specific, command-specific
> 	and default configuration.
>
> 	* vars.el.in (lyskom-default-conference-strategy): New format.
> 	Removed lyskom-default-conference-self as default.
>
> 	* completing-read.el (lyskom-default-conference-last-author): New
> 	function.
>
> 	Pass symbols or lists to lyskom-read-conf-stat and friends:
> 	* startup.el (kom-start-anew): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
>
> 	* review.el (lyskom-review-by-to): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(lyskom-unread-by-to): Same.
>
> 	* filter.el (kom-filter-subject): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(kom-filter-author): Same.
> 	(kom-filter-text): Same.
>
> 	* faqs.el (kom-change-conf-faq): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(kom-list-faqs): Same.
>
> 	* edit-text.el (kom-edit-add-recipient): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(kom-edit-add-bcc): Same.
> 	(kom-edit-add-copy): Same.
> 	(kom-edit-move-text): Same.
>
> 	* completing-read.el (lyskom-read-conf): Support list as prompt.
>
> 	* commands2.el (kom-status-conf): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(kom-status-person): Same.
> 	(kom-set-garb-nice): Same.
> 	(kom-set-permitted-submitters): Same.
> 	(kom-set-super-conf): Same.
> 	(kom-set-personal-label): Same.
> 	(kom-is-person-member-of-conference): Same.
> 	(kom-will-person-read-text): Same.
>
> 	* commands1.el (kom-delete-conf): Pass symbol as prompt to
> 	lyskom-read-conf-stat.
> 	(kom-review-presentation): Same.
> 	(kom-unread-presentation): Same.
> 	(kom-add-member): Same.
> 	(kom-add-self): Same.
> 	(kom-change-priority): Same.
> 	(kom-sub-member): Same.
> 	(kom-sub-self): Same.
> 	(kom-change-presentation): Same.
> 	(kom-change-conf-motd): Same.
> 	(kom-set-presentation): Same.
> 	(kom-set-motd-text): Same.
> 	(kom-remove-presentation): Same.
> 	(kom-unset-conf-motd): Same.
> 	(kom-go-to-conf): Same.
> 	(lyskom-write-text): Same.
> 	(kom-change-name): Same.
> 	(kom-change-parenthesis): Same. Also moved initial to vars.el.in.
> 	(kom-change-supervisor): Same.
> 	(kom-change-password): Same.
> 	(kom-who-is-on-in-conference): Same.
> 	(kom-who-is-present-in-conference): Same.
> 	(lyskom-add-helper): Same.
> 	(kom-sub-recipient): Same.
> 	(lyskom-read-cross-reference-and-get-aux-item): Same. Also cleanup.
> 	(lyskom-read-link): Same.
>
1a83,87
>
> 	Work on supporting UTC timestamps from the server:
> 	* komtypes.el (lyskom-create-time-from-utc): New function.
>
> 	* utilities.el (lyskom-days-in-year): New function.
parent 5ed5b142
2003-08-17 David Byers <byers@lysator.liu.se>
Make initial value for reading confs more configurable:
* filter.el (kom-filter-author): Simplified. Initial values are
now computed in completing-read.el, not here.
* completing-read.el (lyskom-read-conf-guess-initial): Added
PROMPT parameter.
(lyskom-get-initial-conf-strategy): Added PROMPT parameter.
Operate on new format. Combine prompt-specific, command-specific
and default configuration.
* vars.el.in (lyskom-default-conference-strategy): New format.
Removed lyskom-default-conference-self as default.
* completing-read.el (lyskom-default-conference-last-author): New
function.
Pass symbols or lists to lyskom-read-conf-stat and friends:
* startup.el (kom-start-anew): Pass symbol as prompt to
lyskom-read-conf-stat.
* review.el (lyskom-review-by-to): Pass symbol as prompt to
lyskom-read-conf-stat.
(lyskom-unread-by-to): Same.
* filter.el (kom-filter-subject): Pass symbol as prompt to
lyskom-read-conf-stat.
(kom-filter-author): Same.
(kom-filter-text): Same.
* faqs.el (kom-change-conf-faq): Pass symbol as prompt to
lyskom-read-conf-stat.
(kom-list-faqs): Same.
* edit-text.el (kom-edit-add-recipient): Pass symbol as prompt to
lyskom-read-conf-stat.
(kom-edit-add-bcc): Same.
(kom-edit-add-copy): Same.
(kom-edit-move-text): Same.
* completing-read.el (lyskom-read-conf): Support list as prompt.
* commands2.el (kom-status-conf): Pass symbol as prompt to
lyskom-read-conf-stat.
(kom-status-person): Same.
(kom-set-garb-nice): Same.
(kom-set-permitted-submitters): Same.
(kom-set-super-conf): Same.
(kom-set-personal-label): Same.
(kom-is-person-member-of-conference): Same.
(kom-will-person-read-text): Same.
* commands1.el (kom-delete-conf): Pass symbol as prompt to
lyskom-read-conf-stat.
(kom-review-presentation): Same.
(kom-unread-presentation): Same.
(kom-add-member): Same.
(kom-add-self): Same.
(kom-change-priority): Same.
(kom-sub-member): Same.
(kom-sub-self): Same.
(kom-change-presentation): Same.
(kom-change-conf-motd): Same.
(kom-set-presentation): Same.
(kom-set-motd-text): Same.
(kom-remove-presentation): Same.
(kom-unset-conf-motd): Same.
(kom-go-to-conf): Same.
(lyskom-write-text): Same.
(kom-change-name): Same.
(kom-change-parenthesis): Same. Also moved initial to vars.el.in.
(kom-change-supervisor): Same.
(kom-change-password): Same.
(kom-who-is-on-in-conference): Same.
(kom-who-is-present-in-conference): Same.
(lyskom-add-helper): Same.
(kom-sub-recipient): Same.
(lyskom-read-cross-reference-and-get-aux-item): Same. Also cleanup.
(lyskom-read-link): Same.
2003-08-16 David Byers <byers@lysator.liu.se>
Work on supporting UTC timestamps from the server:
* komtypes.el (lyskom-create-time-from-utc): New function.
* utilities.el (lyskom-days-in-year): New function.
Support for new server calls:
* parse.el (lyskom-parse-scheduling-info): New function.
......
......@@ -77,8 +77,7 @@ than the deleted conference will become inaccessible, and will
eventually be permanently deleted."
(interactive)
(let ((conf-stat
(lyskom-read-conf-stat (lyskom-get-string 'what-conf-to-delete)
'(all) nil nil t)))
(lyskom-read-conf-stat 'what-conf-to-delete '(all) nil nil t)))
(if conf-stat
(if (lyskom-ja-or-nej-p
(lyskom-format 'confirm-delete-pers-or-conf
......@@ -193,10 +192,8 @@ This command accepts text number prefix arguments (see
(text-stat->author
(blocking-do 'get-text-stat text-or-conf-no))
text-or-conf-no))
(lyskom-read-conf-stat
(lyskom-get-string 'presentation-for-whom)
'(all)
nil nil t))))
(lyskom-read-conf-stat 'presentation-for-whom '(all)
nil nil t))))
(lyskom-review-presentation conf-stat)))
(def-kom-command kom-unread-presentation (&optional text-or-conf-no)
......@@ -217,9 +214,8 @@ This command accepts text number prefix arguments (see
(text-stat->author
(blocking-do 'get-text-stat text-or-conf-no))
text-or-conf-no))
(lyskom-read-conf-stat
(lyskom-get-string 'unread-presentation-for-whom)
'(all) nil nil t))))
(lyskom-read-conf-stat 'unread-presentation-for-whom
'(all) nil nil t))))
(if (zerop (conf-stat->presentation conf-stat))
(lyskom-format-insert 'has-no-presentation conf-stat)
(lyskom-format-insert 'marking-text-unread
......@@ -522,10 +518,8 @@ server configuration this command may either create an invitation or
simply make the person a member of the conference without asking them
for confirmation."
(interactive)
(let* ((who (lyskom-read-conf-stat (lyskom-get-string 'who-to-add)
'(pers) nil nil t))
(whereto (lyskom-read-conf-stat (lyskom-get-string 'where-to-add)
'(all) nil nil t))
(let* ((who (lyskom-read-conf-stat 'who-to-add '(pers) nil nil t))
(whereto (lyskom-read-conf-stat 'where-to-add '(all) nil nil t))
(pers-stat (blocking-do 'get-pers-stat (conf-stat->conf-no who))))
(lyskom-add-member-answer (lyskom-try-add-member whereto who
pers-stat
......@@ -549,9 +543,8 @@ See `kom-membership-default-priority' and
`kom-membership-default-placement'"
(interactive)
(let* ((whereto (if conf (blocking-do 'get-conf-stat conf)
(lyskom-read-conf-stat
(lyskom-get-string 'where-to-add-self)
'(all) nil nil t)))
(lyskom-read-conf-stat 'where-to-add-self
'(all) nil nil t)))
(mship (lyskom-is-member (conf-stat->conf-no whereto)
lyskom-pers-no)))
......@@ -610,9 +603,8 @@ See `kom-membership-default-priority' and
the priority of several memberships, use `kom-prioritize' instead."
(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 nil t)))
(lyskom-read-conf-stat 'change-priority-for-q
'(all) nil nil t)))
(mship (lyskom-get-membership (conf-stat->conf-no conf-stat) t))
(kom-membership-default-priority nil))
(blocking-do-multiple ((who (get-conf-stat lyskom-pers-no))
......@@ -882,10 +874,8 @@ unless BLOCKING is t, in which cast it is the conf-stat."
supervisor of the conference or of the member being removed."
(interactive)
(lyskom-sub-member
(lyskom-read-conf-stat (lyskom-get-string 'who-to-exclude)
'(pers) nil nil t)
(lyskom-read-conf-stat (lyskom-get-string 'where-from-exclude)
'(all) nil nil t)))
(lyskom-read-conf-stat 'who-to-exclude '(pers) nil nil t)
(lyskom-read-conf-stat 'where-from-exclude '(all) nil nil t)))
(def-kom-command kom-sub-self (&optional conf-no)
......@@ -899,7 +889,7 @@ See `kom-unsubscribe-makes-passive'."
(interactive)
(let* ((me (blocking-do 'get-conf-stat lyskom-pers-no))
(conf (if conf-no (blocking-do 'get-conf-stat conf-no)
(lyskom-read-conf-stat (lyskom-get-string 'leave-what-conf)
(lyskom-read-conf-stat 'leave-what-conf
'(membership) nil nil t))))
(lyskom-sub-member me conf)))
......@@ -1485,9 +1475,7 @@ or conference doesn't have a presentation, a new presentation will
be created."
(interactive)
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no
(lyskom-get-string 'what-to-change-pres-you)
'(all) t nil t)))
(let ((no (lyskom-read-conf-no 'what-to-change-pres-you '(all) t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(blocking-do 'get-conf-stat no))
......@@ -1500,8 +1488,7 @@ be created."
or conference doesn't have a notice, a new notice till be created."
(interactive)
(lyskom-change-pres-or-motd-2
(let ((no (lyskom-read-conf-no (lyskom-get-string 'who-to-put-motd-for)
'(all) t nil t)))
(let ((no (lyskom-read-conf-no 'who-to-put-motd-for '(all) t nil t)))
(if (zerop no)
(setq no lyskom-pers-no))
(blocking-do 'get-conf-stat no))
......@@ -1587,9 +1574,7 @@ TYPE is either 'pres or 'motd, depending on what should be changed."
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive "P")
(let ((conf-no (lyskom-read-conf-no
(lyskom-get-string 'what-to-set-pres-you)
'(all) t nil t))
(let ((conf-no (lyskom-read-conf-no 'what-to-set-pres-you '(all) t nil t))
(text-no (lyskom-read-text-no-prefix-arg 'what-text-to-set-as-pres-no t
lyskom-previous-text)))
(when (zerop conf-no)
......@@ -1605,9 +1590,7 @@ This command accepts text number prefix arguments (see
This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive "P")
(let ((conf-no (lyskom-read-conf-no
(lyskom-get-string 'what-to-set-motd-you)
'(all) t nil t))
(let ((conf-no (lyskom-read-conf-no 'what-to-set-motd-you '(all) t nil t))
(text-no (lyskom-read-text-no-prefix-arg
'what-text-to-set-as-motd-no t
lyskom-previous-text)))
......@@ -1653,9 +1636,8 @@ This command accepts text number prefix arguments (see
remove a presentation without adding a new one. This can be accomplished
with the `kom-change-presentation' command."
(interactive)
(let ((conf-stat (or (lyskom-read-conf-stat
(lyskom-get-string 'who-to-remove-pres-for)
'(all) t nil t)
(let ((conf-stat (or (lyskom-read-conf-stat 'who-to-remove-pres-for
'(all) t nil t)
(blocking-do 'get-conf-stat lyskom-pers-no))))
(cond ((null conf-stat)
(lyskom-insert-string 'cant-get-conf-stat))
......@@ -1676,9 +1658,8 @@ with the `kom-change-presentation' command."
(def-kom-command kom-unset-conf-motd ()
"Removes the notice for a person or conference."
(interactive)
(let ((conf-stat (or (lyskom-read-conf-stat
(lyskom-get-string 'who-to-remove-motd-for)
'(all) t nil t)
(let ((conf-stat (or (lyskom-read-conf-stat 'who-to-remove-motd-for
'(all) t nil t)
(blocking-do 'get-conf-stat lyskom-pers-no))))
(cond
((null conf-stat)
......@@ -1705,8 +1686,7 @@ Changing conferences runs `kom-change-conf-hook' and
(interactive)
(let ((conf (if conf-no
(blocking-do 'get-conf-stat conf-no)
(lyskom-read-conf-stat (lyskom-get-string 'go-to-conf-p)
'(all) nil nil t))))
(lyskom-read-conf-stat 'go-to-conf-p '(all) nil nil t))))
(when (lyskom-check-go-to-conf conf)
(lyskom-go-to-conf conf))))
......@@ -1843,8 +1823,7 @@ recipients are handled."
(lyskom-nag-about-presentation)
(let* ((tono (if (and arg lyskom-current-conf (not (zerop lyskom-current-conf)))
lyskom-current-conf
(lyskom-read-conf-no (lyskom-get-string prompt)
'(pers conf) nil nil 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))
......@@ -2158,9 +2137,8 @@ If it is 'conf, only conferences will be listed."
name of a conference or person, you need to be the supervisor of that
conference or person."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'name-to-be-changed)
'(all) nil nil t)))
(let ((conf-stat (lyskom-read-conf-stat 'name-to-be-changed
'(all) nil nil t)))
(if (null conf-stat)
(lyskom-insert-string 'no-such-conf-or-pers)
(let (name)
......@@ -2190,9 +2168,8 @@ In some LysKOM communities it is popular to put a witticism enclosed in
parenthesis at the end of one's name. This command is intended to make
it easy to change this information."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'name-to-be-changed)
'(all) nil lyskom-pers-no t)))
(let ((conf-stat (lyskom-read-conf-stat 'name-to-be-changed
'(all) nil nil t)))
(if (null conf-stat)
(lyskom-insert-string 'no-such-conf-or-pers)
(cond
......@@ -2227,15 +2204,13 @@ it easy to change this information."
"Change the supervisor of a person or conference. You need to be the
supervisor of the person or conference to perform this operation."
(interactive)
(let ((supervisee (lyskom-read-conf-stat
(lyskom-get-string 'who-to-change-supervisor-for)
'(all) nil nil t)))
(let ((supervisee (lyskom-read-conf-stat 'who-to-change-supervisor-for
'(all) nil nil t)))
(if (null supervisee)
(lyskom-insert-string 'no-such-conf-or-pers)
(lyskom-tell-internat 'kom-tell-change-supervisor)
(let ((supervisor (lyskom-read-conf-stat
(lyskom-get-string 'new-supervisor)
'(all) nil nil t)))
(let ((supervisor (lyskom-read-conf-stat 'new-supervisor
'(all) nil nil t)))
(lyskom-format-insert 'change-supervisor-from-to
supervisee
supervisor)
......@@ -2510,8 +2485,7 @@ If MARK-NO is nil, review all marked texts."
person you need either the old password for the person, or have
administrative privileges enabled."
(interactive)
(let ((pers-no (lyskom-read-conf-no (lyskom-get-string 'whos-passwd)
'(pers) t nil t))
(let ((pers-no (lyskom-read-conf-no 'whos-passwd '(pers) t nil t))
(old-pw (silent-read (lyskom-get-string 'old-passwd)))
(new-pw1 (silent-read (lyskom-get-string 'new-passwd)))
(new-pw2 (silent-read (lyskom-get-string 'new-passwd-again))))
......@@ -2683,7 +2657,7 @@ Several variables affect display. See `kom-show-where-and-what',
`kom-show-since-and-when' and `kom-idle-hide' for more information."
(interactive "P")
(let ((conf-stat
(lyskom-read-conf-stat (lyskom-get-string 'who-is-on-in-what-conference)
(lyskom-read-conf-stat 'who-is-on-in-what-conference
'(all) nil nil t)))
(condition-case nil
(if (lyskom-have-feature dynamic-session-info)
......@@ -2713,7 +2687,7 @@ Several variables affect display. See `kom-show-where-and-what',
`kom-show-since-and-when' and `kom-idle-hide' for more information."
(interactive "P")
(let ((conf-stat
(lyskom-read-conf-stat (lyskom-get-string 'who-is-present-in-what-conference)
(lyskom-read-conf-stat 'who-is-present-in-what-conference
'(all) nil nil t)))
(condition-case nil
(if (lyskom-have-feature dynamic-session-info)
......@@ -3621,12 +3595,9 @@ This command accepts text number prefix arguments (see
(move-attachments nil)
(conf (blocking-do 'get-conf-stat
(lyskom-default-value last-variable)))
(target (lyskom-read-conf-stat
(lyskom-get-string who-prompt)
'(all)
nil
(and conf (cons (conf-stat->name conf) 0))
t)))
(target (lyskom-read-conf-stat who-prompt '(all)
nil (and conf (conf-stat->name conf))
t)))
(when (and target text-no)
......@@ -3711,10 +3682,10 @@ This command accepts text number prefix arguments (see
(if recipients
(let* ((conf (lyskom-default-recpt-for-sub recipients))
(source (lyskom-read-conf-stat
(lyskom-get-string 'who-to-sub-q)
'who-to-sub-q
(list (cons 'restrict (mapcar 'car recipients)))
nil
(and conf (cons (conf-stat->name conf) 0))
(and conf (conf-stat->name conf))
t)))
(when source
(setq move-footnotes (and footnotes (lyskom-j-or-n-p 'sub-footnotes-too-q)))
......@@ -3765,14 +3736,12 @@ recipient to remove and target the recipient to add to text-stat."
(mapcar 'car
recipients)))
nil
(and default-from
(cons (conf-stat->name default-from) 0))
(and default-from (conf-stat->name default-from))
t))
(target (lyskom-read-conf-stat
'who-to-move-to-q '(all)
nil
(and default-to
(cons (conf-stat->name default-to) 0))
(and default-to (conf-stat->name default-to))
t)))
(when (and source target)
(setq move-footnotes (and footnotes (lyskom-j-or-n-p 'move-footnotes-too-q)))
......@@ -3821,8 +3790,7 @@ This command accepts text number prefix arguments (see
'who-to-move-from-q
(list (cons 'restrict (mapcar 'car recipients)))
nil
(and default-from
(cons (conf-stat->name default-from) 0))
(and default-from (conf-stat->name default-from))
t))
(to-do (list (text-stat->text-no root-text-stat)))
(done nil))
......@@ -3902,7 +3870,7 @@ This command accepts text number prefix arguments (see
'(all)
(> (length text-to-move-recipients) 1)
(and default-to
(cons (conf-stat->name default-to) 0))
(conf-stat->name default-to))
t)))
(if target
(progn
......@@ -4213,26 +4181,23 @@ corresponding aux-item."
t)
completions)))
(obj nil)
(prompt nil)
(char nil))
(cond
((eq type 'text)
(setq prompt (lyskom-get-string 'which-text-to-xref))
(while (null obj)
(setq obj (text-stat->text-no
(blocking-do 'get-text-stat
(lyskom-read-number prompt))))
(setq prompt (lyskom-get-string 'which-text-to-xref-err )))
(let ((prompt 'which-text-to-xref))
(while (null obj)
(setq obj (text-stat->text-no
(blocking-do 'get-text-stat
(lyskom-read-number prompt))))
(setq prompt 'which-text-to-xref-err )))
(setq char "T"))
((eq type 'conf)
(setq prompt (lyskom-get-string 'which-conf-to-xref))
(while (null obj)
(setq obj (lyskom-read-conf-no prompt '(conf) nil nil t)))
(setq obj (lyskom-read-conf-no 'which-conf-to-xref '(conf) nil nil t)))
(setq char "C"))
((eq type 'pers)
(setq prompt (lyskom-get-string 'which-pers-to-xref))
(while (null obj)
(setq obj (lyskom-read-conf-no prompt '(pers) nil nil t)))
(setq obj (lyskom-read-conf-no 'which-pers-to-xref '(pers) nil nil t)))
(setq char "P")))
(when obj
......@@ -4258,15 +4223,14 @@ link as a string."
nil
t)
completions)))
(obj nil)
(prompt nil))
(obj nil))
(cond
((eq type 'text)
(setq prompt (lyskom-get-string 'which-text-to-link))
(while (null obj)
(setq obj (blocking-do 'get-text-stat
(lyskom-read-number prompt)))
(setq prompt (lyskom-get-string 'which-text-to-link-err )))
(let ((prompt 'which-text-to-link))
(while (null obj)
(setq obj (blocking-do 'get-text-stat
(lyskom-read-number prompt)))
(setq prompt 'which-text-to-link-err )))
(let* ((text-no (text-stat->text-no obj))
(text (blocking-do 'get-text text-no))
(txt (text->decoded-text-mass text obj))
......@@ -4275,16 +4239,14 @@ link as a string."
(format "<text %d: %s>" text-no subject)))
((eq type 'conf)
(setq prompt (lyskom-get-string 'which-conf-to-link))
(while (null obj)
(setq obj (lyskom-read-conf-stat prompt '(conf) nil nil t)))
(setq obj (lyskom-read-conf-stat 'which-conf-to-link '(conf) nil nil t)))
(format "<möte %d: %s>" (conf-stat->conf-no obj)
(conf-stat->name obj)))
((eq type 'pers)
(setq prompt (lyskom-get-string 'which-pers-to-link))
(while (null obj)
(setq obj (lyskom-read-conf-stat prompt '(pers) nil nil t)))
(setq obj (lyskom-read-conf-stat 'which-pers-to-link '(pers) nil nil t)))
(format "<person %d: %s>" (conf-stat->conf-no obj)
(conf-stat->name obj))))))
......
......@@ -194,8 +194,7 @@ otherwise: the conference is read with lyskom-completing-read."
(interactive)
(let ((conf-no
(or conf-no
(lyskom-read-conf-no (lyskom-get-string 'conf-for-status)
'(all) nil nil t)))
(lyskom-read-conf-no 'conf-for-status '(all) nil nil t)))
(kom-print-seconds-in-time-strings nil)
(kom-extended-status-information (lyskom-extended-status-override 'conf)))
(cache-del-conf-stat conf-no)
......@@ -395,8 +394,7 @@ This command accepts text number prefix arguments \(see
(or (when (interactive-p)
(text-stat->author (blocking-do 'get-text-stat text-or-pers-no)))
text-or-pers-no
(lyskom-read-conf-no (lyskom-get-string 'pers-for-status)
'(pers) nil nil t)))
(lyskom-read-conf-no 'pers-for-status '(pers) nil nil t)))
(kom-print-seconds-in-time-strings nil)
(kom-extended-status-information (lyskom-extended-status-override 'pers))
conf-stat
......@@ -607,8 +605,7 @@ See `kom-default-message-recipient'."
(let* ((tmp nil)
(target (or who
(lyskom-read-conf-no
(format (lyskom-get-string 'who-to-send-message-to)
(lyskom-get-string 'nobody))
`(who-to-send-message-to ,(lyskom-get-string 'nobody))
(if kom-permissive-completion
'(all)
'(login conf))
......@@ -1477,9 +1474,8 @@ conference will eventually be deleted automatically \(this process is
called garbage collection). This can only happen when a text is older
than the garbage collection time of all its recipients."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'conf-to-set-garb-nice-q)
'(all) nil nil t)))
(let ((conf-stat (lyskom-read-conf-stat 'conf-to-set-garb-nice-q
'(all) nil nil t)))
(if (not conf-stat)
(lyskom-insert-string 'somebody-deleted-that-conf)
(let ((garb-nice (lyskom-read-number 'new-garb-nice-q)))
......@@ -1504,15 +1500,14 @@ than the garbage collection time of all its recipients."
The permitted submitters of a conference is another conference. Only
members of the permitted submitters may submit texts to the conference."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'conf-to-set-permitted-submitters-q)
'(all) nil nil t)))
(let ((conf-stat (lyskom-read-conf-stat 'conf-to-set-permitted-submitters-q
'(all) nil nil t)))
(if (not conf-stat)
(lyskom-insert-string 'somebody-deleted-that-conf)
(let ((new-conf (lyskom-read-conf-stat
(lyskom-format 'new-permitted-submitters-q
(conf-stat->name conf-stat))
`(new-permitted-submitters-q
,(conf-stat->name conf-stat))
'(all)
t nil t)))
(if (eq new-conf nil)
......@@ -1543,14 +1538,12 @@ If a conference is set to only accept new texts, and not comments, any
comments submitted to the conference will be sent to the super
conference instead."
(interactive)
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'conf-to-set-super-conf-q)
'(all) nil nil t)))
(let ((conf-stat (lyskom-read-conf-stat 'conf-to-set-super-conf-q
'(all) nil nil t)))
(if (not conf-stat)
(lyskom-insert-string 'somebody-deleted-that-conf)
(let ((new-conf (lyskom-read-conf-stat
(lyskom-format 'new-super-conf-q
(conf-stat->name conf-stat))
`(new-super-conf-q ,(conf-stat->name conf-stat))
'(all) nil nil t)))
;; Set the super conference for conf-stat to new-conf.
......@@ -2298,13 +2291,12 @@ Sets a personal label on an object of some kind."
((memq type '(conf pers))
(setq object
(lyskom-read-conf-stat (lyskom-get-string
(if (eq type 'pers)
'label-what-pers
'label-what-conf))
(if (eq type 'pers)
'(pers)
'(all))
(lyskom-read-conf-stat (if (eq type 'pers)
'label-what-pers
'label-what-conf)
(if (eq type 'pers)
'(pers)
'(all))
nil nil t))
(setq objno (conf-stat->conf-no object))
(setq aux (conf-stat-find-aux object 10 lyskom-pers-no))
......@@ -2635,12 +2627,12 @@ See `kom-keep-alive' for more information."
(interactive)
(let* ((pers-no
(or pers-no
(lyskom-read-conf-no (lyskom-get-string 'pers-to-check-mship-for)
(lyskom-read-conf-no 'pers-to-check-mship-for
'(all) nil nil t)))
(conf-stat
(if conf-no
(blocking-do 'get-conf-stat conf-no)
(lyskom-read-conf-stat (lyskom-get-string 'conf-to-check-mship-of)
(lyskom-read-conf-stat 'conf-to-check-mship-of
'(all) nil nil t)))
(mship (lyskom-is-member (conf-stat->conf-no conf-stat) pers-no)))
(if (null mship)
......@@ -2686,7 +2678,7 @@ If a prefix argument is given, that text will be checked.
This command accepts text number prefix arguments \(see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-conf-no (lyskom-get-string 'pers-to-check-will-read-for)
(interactive (list (lyskom-read-conf-no 'pers-to-check-will-read-for
'(all) nil nil t)
(lyskom-read-text-no-prefix-arg 'text-to-check-will-read-for
t)))
......@@ -2921,13 +2913,14 @@ properly in the client."
(completion-ignore-case t)
(object-type
(cdr (lyskom-string-assoc
(lyskom-completing-read (lyskom-get-string 'what-kind-to-add-aux-to)
completions
nil t)
(lyskom-completing-read
(lyskom-get-string 'what-kind-to-add-aux-to)
completions nil t)
completions)))
(object-id (cond ((eq object-type 'server) nil)
((eq object-type 'conference)
(lyskom-read-conf-no 'which-conf-to-add-aux-to '(pers conf)))
(lyskom-read-conf-no 'which-conf-to-add-aux-to
'(pers conf)))
((eq object-type 'text)
(lyskom-read-number 'which-text-to-add-aux-to
(if (and lyskom-current-text
......
......@@ -39,6 +39,7 @@
"$Id$\n"))
(defvar lyskom-name-hist nil)
(defvar lyskom-saved-answers nil)
......@@ -205,13 +206,30 @@ See lyskom-read-conf for a description of the parameters."
(defun lyskom-default-conference-not-current (uc)
(not (eq (uconf-stat->conf-no uc) lyskom-current-conf)))