Commit 329926a6 authored by David Byers's avatar David Byers
Browse files

Fixed bug 697. Other minor fixes.

Detailed changes:
> 2003-04-06  David Byers  <byers@lysator.liu.se>
>
> 	Cosmetic fix:
> 	* commands1.el (lyskom-list-conf-print): Don't make each line
> 	clickable in its entirety. Just print things normally.
>
> 	Handle conf-z-info more correctly in lyskom-format:
> 	* lyskom-buttons.el (lyskom-default-button): Support conf-z-info
> 	as argument for conf and pers buttons.
>
> 	* lyskom-rest.el (lyskom-format-aux-help): When conf-z-info is
> 	passed to %M, create a button.
>
> 	Fix error message when trying to unread everything:
> 	* review.el (lyskom-get-texts-globally): Added do-unread parameter.
> 	(kom-unread-more): Pass do-unread to lyskom-get-texts-by-to.
> 	(lyskom-unread-by-to): Ditto.
> 	(lyskom-get-texts-by-to): Added do-unread parameter to
> 	lyskom-get-texts-by-to.
>
> 	Fix bug 697:
> 	* commands1.el (kom-jump): Treat REVIEW-FAQ-TREE like REVIEW-TREE.
>
> 	* lyskom-rest.el (kom-view-next-text): Treat REVIEW-FAQ-TREE like
> 	review when altering the read list, but not otherwise.
> 	(lyskom-update-prompt): Treat REVIEW-FAQ-TREE like REVIEW-FAQ.
>
> 	* commands2.el (lyskom-list-summary): Added REVIEW-FAQ-TREE and
> 	REVIEW-TREE to if statement towards the end.
>
> 	* vars.el.in (lyskom-review-types-list): Added REVIEW-FAQ-TREE.
>
> 	* faqs.el (lyskom-present-unread-faqs): Pass t as review-tree
> 	argument to lyskom-do-review-faq.
> 	(lyskom-do-review-faq): Added argument review-tree.
>
> 2003-04-05  David Byers  <byers@lysator.liu.se>
>
> 	* lyskom-buttons.el (lyskom-highlight-has-no-presentation): Don't
> 	highlight secret conferences.
parent 84fe49f9
2003-04-05 David Byers <byers@lysator.liu.se>
2003-04-06 David Byers <byers@lysator.liu.se>
* Changed my e-mail address to one I actually read.
Cosmetic fix:
* commands1.el (lyskom-list-conf-print): Don't make each line
clickable in its entirety. Just print things normally.
Handle conf-z-info more correctly in lyskom-format:
* lyskom-buttons.el (lyskom-default-button): Support conf-z-info
as argument for conf and pers buttons.
* lyskom-rest.el (lyskom-format-aux-help): When conf-z-info is
passed to %M, create a button.
Fix error message when trying to unread everything:
* review.el (lyskom-get-texts-globally): Added do-unread parameter.
(kom-unread-more): Pass do-unread to lyskom-get-texts-by-to.
(lyskom-unread-by-to): Ditto.
(lyskom-get-texts-by-to): Added do-unread parameter to
lyskom-get-texts-by-to.
Fix bug 697:
* commands1.el (kom-jump): Treat REVIEW-FAQ-TREE like REVIEW-TREE.
* lyskom-rest.el (kom-view-next-text): Treat REVIEW-FAQ-TREE like
review when altering the read list, but not otherwise.
(lyskom-update-prompt): Treat REVIEW-FAQ-TREE like REVIEW-FAQ.
* commands2.el (lyskom-list-summary): Added REVIEW-FAQ-TREE and
REVIEW-TREE to if statement towards the end.
* vars.el.in (lyskom-review-types-list): Added REVIEW-FAQ-TREE.
* faqs.el (lyskom-present-unread-faqs): Pass t as review-tree
argument to lyskom-do-review-faq.
(lyskom-do-review-faq): Added argument review-tree.
2003-04-05 David Byers <byers@lysator.liu.se>
* lyskom-buttons.el (lyskom-highlight-has-no-presentation): Don't
highlight secret conferences.
* Changed my e-mail address to one I actually read.
Fix bugs 951 and 952:
* Makefile: Echo x-ctext coding to all emacs lisp files created in
Makefile, since there is now an x-ctext file in the sources.
......
......@@ -55,6 +55,7 @@
;;; commands: kom-find-root-review, kom-review-tree
;;; REVIEW-MARK - List of texts created by the review-mark command
;;; REVIEW-FAQ - List of texts created by kom-review-faq or similar
;;; REVIEW-FAQ-TREE - Like REVIEW-TREE but for FAQs
;;; COMM-IN - Type containing the list of comments to a text
;;; FOOTN-IN - Type containing the list of footnotes to a text
;;; CONF - Basic type of unread in a conf.
......
......@@ -2000,8 +2000,7 @@ See `kom-allow-incompleteness'."
(defun lyskom-list-conf-print (conf-z)
"Print a line of info about CONF-NO.
If you are not member in the conference it will be flagged with an asterisk."
(lyskom-format-insert "%[%#1@%5#2:m %#3c %#2M%]\n"
(lyskom-default-button 'conf (conf-z-info->conf-no conf-z))
(lyskom-format-insert "%5#1m %#2c %#1M\n"
conf-z
(lyskom-list-conf-membership-char (conf-z-info->conf-no conf-z))))
......@@ -3511,7 +3510,8 @@ This command accepts text number prefix arguments (see
`lyskom-read-text-no-prefix-arg')."
(interactive (list (lyskom-read-text-no-prefix-arg 'jump-from-text)))
(cond ((and (null current-prefix-arg)
(eq 'REVIEW-TREE (read-info->type (read-list->first lyskom-reading-list))))
(or (eq 'REVIEW-TREE (read-info->type (read-list->first lyskom-reading-list)))
(eq 'REVIEW-FAQ-TREE (read-info->type (read-list->first lyskom-reading-list)))))
(lyskom-start-of-command 'kom-jump)
(lyskom-format-insert 'jumping-from-text-review)
(unwind-protect
......
......@@ -1076,7 +1076,7 @@ the text on one line."
(read-list->nth read-list r)))))
(and (null conf-no)
(memq (read-info->type (read-list->nth read-list r))
'(CONF REVIEW-MARK REVIEW REVIEW-FAQ))))
'(CONF REVIEW-MARK REVIEW REVIEW-TREE REVIEW-FAQ REVIEW-FAQ-TREE))))
(setq len 0)
(setq r (1+ r))))
(setq read-info (read-list->nth read-list r))
......
......@@ -883,6 +883,7 @@ Mark the envelope with \"LysKOM bug report\"\n\n")
(review-cant-read-letterbox . "You can't review texts to somebody else's mailbox.\n")
(review-cant-read-empty . "The conference is empty.\n")
(cant-review-everything . "You cannot review every text in LysKOM.\n")
(cant-unread-everything . "You cannot unread every text in LysKOM.\n")
(more-than-one-root . "Text %#1n has more than one root.\n")
(more-than-one-root-review . "\
......
......@@ -258,9 +258,9 @@ do this. To add a FAQ, use `kom-add-server-faq'."
(lyskom-do-review-faq faq-list)
))))
(defun lyskom-do-review-faq (faq-list)
(defun lyskom-do-review-faq (faq-list &optional review-tree)
(read-list-enter-read-info
(lyskom-create-read-info 'REVIEW-FAQ
(lyskom-create-read-info (if review-tree 'REVIEW-FAQ-TREE 'REVIEW-FAQ)
nil
(lyskom-review-get-priority)
(lyskom-create-text-list faq-list)
......@@ -463,5 +463,5 @@ create a new FAQ."
(lyskom-do-list-summary faq-list))
(when kom-auto-review-faqs
(lyskom-do-review-faq faq-list))))
(lyskom-do-review-faq faq-list t))))
......@@ -571,8 +571,13 @@ up."
((lyskom-uconf-stat-p arg)
(if (conf-type->letterbox (uconf-stat->conf-type arg))
(setq type 'pers))
(setq xarg arg
(setq xarg (conf-z-info->conf-no arg)
text (uconf-stat->name arg)))
((lyskom-conf-z-info-p arg)
(if (conf-type->letterbox (conf-z-info->conf-type arg))
(setq type 'pers))
(setq xarg (conf-z-info->conf-no arg)
text (conf-z-info->name arg)))
((numberp arg)
(if (setq xarg (cache-get-uconf-stat arg))
(progn
......@@ -591,8 +596,11 @@ up."
((lyskom-uconf-stat-p arg)
(setq xarg arg
text (uconf-stat->name arg)))
((lyskom-conf-z-info-p arg)
(setq xarg arg
text (conf-z-info->name arg)))
((lyskom-pers-stat-p arg)
(setq xarg arg
(setq xarg (conf-z-info->conf-no arg)
text (or (conf-stat->name
(cache-get-conf-stat
(pers-stat->pers-no arg)))
......@@ -1370,5 +1378,7 @@ ARG is interpreted by `lyskom-highlight-function-get-conf-stat'.
This function never makes server calls, so if the information required
to answer accurately is not cached, this function will return an incorrect
result (nil instead of t)."
(eq 0 (conf-stat->presentation
(lyskom-highlight-function-get-conf-stat arg))))
(let ((conf-stat (lyskom-highlight-function-get-conf-stat arg)))
(cond ((null conf-stat) nil)
((conf-type->secret (conf-stat->conf-type conf-stat)) nil)
(t (eq 0 (conf-stat->presentation conf-stat))))))
......@@ -483,11 +483,11 @@ settings to control session priorities."
(type (read-info->type tri))
(priority (read-info->priority
(read-list->first lyskom-reading-list)))
(is-review-tree (eq type 'REVIEW-TREE))
(is-review-tree (memq type '(REVIEW-TREE)))
(is-review (or (memq type '(REVIEW REVIEW-MARK REVIEW-FAQ))
is-review-tree))
(mark-as-read (not is-review)))
(when is-review
(when (or is-review (eq type 'REVIEW-FAQ-TREE))
(set-text-list->texts
(read-info->text-list tri)
(delq text-no (text-list->texts
......@@ -1785,6 +1785,7 @@ Deferred insertions are not supported."
(if (and (not colon-flag)
(or (lyskom-conf-stat-p arg)
(lyskom-uconf-stat-p arg)
(lyskom-conf-z-info-p arg)
(numberp arg)))
(setq propl
(append
......@@ -2826,7 +2827,8 @@ Set lyskom-current-prompt accordingly. Tell server what I am doing."
'review-next-comment-prompt)
((eq 'REVIEW-MARK (read-info->type read-info))
'review-next-marked-prompt)
((eq 'REVIEW-FAQ (read-info->type read-info))
((or (eq 'REVIEW-FAQ (read-info->type read-info))
(eq 'REVIEW-FAQ-TREE (read-info->type read-info)))
'review-next-faq-prompt)
;; The following is not really correct. The text to be
;; read might be in another conference.
......@@ -2859,6 +2861,9 @@ Set lyskom-current-prompt accordingly. Tell server what I am doing."
((eq 'REVIEW-FAQ
(read-info->type (read-list->first lyskom-to-do-list)))
'go-to-conf-of-review-faq-prompt)
((eq 'REVIEW-FAQ-TREE
(read-info->type (read-list->first lyskom-to-do-list)))
'go-to-conf-of-review-faq-prompt)
((eq 'REVIEW-TREE
(read-info->type (read-list->first lyskom-to-do-list)))
'go-to-conf-of-review-tree-prompt)
......
......@@ -219,7 +219,7 @@ mark unread performed with `kom-unread-by-to'."
to))
(condition-case arg
(let ((list (lyskom-get-texts-by-to by to count t)))
(let ((list (lyskom-get-texts-by-to by to count t t)))
(setq lyskom-last-unread-num
(if (< lyskom-last-unread-num 0)
(- count)
......@@ -435,7 +435,7 @@ texts, review the last N texts instead of the first (you can use
(setq lyskom-have-unread t)
(condition-case arg
(let ((list (lyskom-get-texts-by-to by to count)))
(let ((list (lyskom-get-texts-by-to by to count nil t)))
(if list
(lyskom-traverse text-no list
(unless (lyskom-mark-unread text-no)
......@@ -462,11 +462,11 @@ texts, review the last N texts instead of the first (you can use
;;;
(defun lyskom-get-texts-by-to (by to num &optional again)
(defun lyskom-get-texts-by-to (by to num &optional again do-unread)
"Get NUM texts written by person number BY in conference number TO
Args: BY TO NUM"
Args: BY TO NUM AGAIN DO-UNREAD"
(cond ((and (zerop by)
(zerop to)) (lyskom-get-texts-globally num again))
(zerop to)) (lyskom-get-texts-globally num again do-unread))
((zerop to) (lyskom-get-texts-by by num again))
((zerop by) (lyskom-get-texts-to to num again))
((and (eq by lyskom-pers-no)
......@@ -536,7 +536,7 @@ This function signals an error if review is impossible"
;;; Author: Per Cederquist, David Byers
;;;
(defun lyskom-get-texts-globally (num &optional again)
(defun lyskom-get-texts-globally (num &optional again do-unread)
"Get the last NUM texts created in LysKOM. If AGAIN is non-nil, keep
going from where we were before."
(cond ((and again (null num))
......@@ -544,7 +544,8 @@ going from where we were before."
((and again (< lyskom-last-review-num 0))
(setq num (- num)))
((null num)
(lyskom-format-insert 'cant-review-everything)
(lyskom-format-insert
(if do-unread 'cant-unread-everything 'cant-review-everything))
(signal 'lyskom-cant-review-error t)))
(let ((result nil)
......
......@@ -915,6 +915,7 @@ M
(review-cant-read-letterbox . "Du kan inte terse inlgg till ngon annans brevlda.\n")
(review-cant-read-empty . "Mtet r tomt.\n")
(cant-review-everything . "Du kan inte terse alla texter i LysKOM.\n")
(cant-unread-everything . "Du kan inte olsmarkera alla texter i LysKOM.\n")
(more-than-one-root . "Inlgg %#1n har mer n ett urinlgg.\n")
(more-than-one-root-review .
......
......@@ -4007,7 +4007,8 @@ environment variable for this, but it shouldn't be used if there is."
(defconst lyskom-comment-types-list '(COMM-IN FOOTN-IN))
(defconst lyskom-recpt-types-list '(RECPT CC-RECPT BCC-RECPT))
(defconst lyskom-review-types-list '(REVIEW REVIEW-TREE
REVIEW-MARK REVIEW-FAQ))
REVIEW-MARK REVIEW-FAQ
REVIEW-FAQ-TREE))
(eval-and-compile (provide 'lyskom-vars))
......
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