Commit b496e294 authored by David Kågedal's avatar David Kågedal
Browse files

Fördröjning av en massa utskrifter. Plus lite bugfixar.

parent 63811c87
Nyheter i lyskom.el 0.41
========================
Version 0.41 av elispklienten finns nu tillgänglig. Den innehåller
rättningar på ett par mer eller mindra allvarligar buggar i 0.40 och
ett par nya finesser.
* Fitjurs och förbättringar
** Det går en aning fortare att visa texter. Detta görs genom att
utskrift av namn på författare till kommentarer mm. fördröjs om de
inte redan finns i cachen.
** Innehållet i bufferten scrollas mer kontinuerligt allteftersom
utmatning kommer. Tidigare scrollade den bara när man fick en
prompt. Med det nyare beteendet är det lättare att se att något
......@@ -17,11 +17,23 @@ ett par nya finesser.
** Man blir inte längre ombedd att skriva en presentation när man
skapar hemliga möten.
** Kommandot kom-view-previous-commented-text är nytt.
** Kommandot "Återse det föregående kommenterade"
(kom-view-previous-commented-text) är nytt, och finns på åK.
** Information om vem som har adderat en kommentarslänk visas nu i
kommentaren.
** Det kan gå mycket fortare än förut. Detta görs genom att utskrift
av namn och information om kommentarslänkar fördröjs om de inte
redan finns i cachen. Detta kan eventuellt bli besvärligt om man
använder en långsam terminal. Beteendet kan styras med variabeln
kom-delayed-printing.
I denna version är detta avslaget per default, eftersom vi inte har
testat att det fungerar tillfredsställande, men vi uppmanar alla
att testa att sätta kom-delayed-printing till t och berätta om
eventuella problem.
* Bugfixar
** Återse senaste fungerar! De problem som rapporterats om detta
......@@ -37,7 +49,7 @@ ett par nya finesser.
** Det är svårare att få klienten att stoppa köerna av misstag.
** Man kan nu trycka 'åak' direkt efter att ha skrivit en kommentar
genom att trycka på 'k'.
genom att trycka på 'k' igen.
* Välkända buggar som inte behöver rapporteras igen (och igen (och igen))
......@@ -91,3 +103,7 @@ kom-default-face-scheme och lyskom-face-schemes f
Hanteringen av färger kan nog ändras igen om vi kommer på ett
smidigare sätt att göra det.
Local variables:
mode: outline
End:
Thu Apr 25 01:42:29 1996 David Kgedal <davidk@lysator.liu.se>
* vars.el.in (kom-delayed-printing): ndrade default till nil.
* view-text.el (lyskom-print-delayed-header-comm): Radera efter
att den nya texten skrivits in. P s stt blandas inte markers s
ltt ihop.
* commands1.el (kom-list-conferences): Skicka mtesnummer till
lyskom-list-conf-print.
(lyskom-list-conf-print): Anvnd mtesnummer istllet fr
conf-stat, s att utskriften kan frdrjas.
(kom-list-persons,lyskom-list-pers-print): Samma trick.
* lyskom-rest.el (lyskom-filter): Skrev om testet efte newline.
* vars.el.in (kom-delayed-printing): Ny variabel.
* lyskom-rest.el (lyskom-format-aux-help): Anvnd den.
* view-text.el (lyskom-print-header-comm): Dito.
Wed Apr 24 03:44:31 1996 David Kgedal <davidk@lysator.liu.se>
* view-text.el (lyskom-print-header-comm): Delade upp den s att
utskriften kan frdrjas.
(lyskom-print-delayed-header-comm): Den frdrjda utskriften.
* lyskom-rest.el (lyskom-insert-at-point): Ny funktion.
(lyskom-format-insert-at-point): Ny funktion.
Tue Apr 23 00:47:17 1996 David Kgedal <davidk@lysator.liu.se>
* lyskom-rest.el (lyskom-start-of-command): Anta att
......
......@@ -1139,17 +1139,16 @@ Args: CONF-STAT MEMBERSHIP"
(lyskom-get-string 'search-for-pers))))
(mapcar
(function (lambda (no)
(lyskom-list-pers-print (blocking-do 'get-conf-stat no))))
(lyskom-list-pers-print no)))
(lyskom-extract-persons (blocking-do 'lookup-name match))))
(defun lyskom-list-pers-print (conf-stat)
"Print name of the person in CONF-STAT for kom-list-persons."
(if conf-stat
(lyskom-format-insert "%[%#1@%4#2:p %#3:P%]\n"
(lyskom-default-button 'conf conf-stat)
conf-stat
conf-stat)))
(defun lyskom-list-pers-print (conf-no)
"Print name of the person CONF-NO for kom-list-persons."
(lyskom-format-insert "%[%#1@%4#2:p %#3P%]\n"
(lyskom-default-button 'pers conf-no)
conf-no
conf-no))
......@@ -1166,21 +1165,19 @@ Those that you are not a member in will be marked with an asterisk."
(lyskom-get-string 'search-for-conf))))
(mapcar
(function (lambda (no)
(lyskom-list-conf-print (blocking-do 'get-conf-stat no))))
(lyskom-list-conf-print no)))
(lyskom-extract-confs (blocking-do 'lookup-name match))))
(defun lyskom-list-conf-print (conf-stat)
"Print a line of info about conf-stat.
(defun lyskom-list-conf-print (conf-no)
"Print a line of info about CONF-NO.
If you are not member in the conference it will be flagged with an asterisk."
(if (not conf-stat)
nil
(lyskom-format-insert "%[%#1@%4#2:m %#3c %#4:M%]\n"
(lyskom-default-button 'conf conf-stat)
conf-stat
(if (lyskom-member-p (conf-stat->conf-no conf-stat))
32 ?*)
conf-stat)))
(lyskom-format-insert "%[%#1@%4#2:m %#3c %#4M%]\n"
(lyskom-default-button 'conf conf-no)
conf-no
(if (lyskom-member-p conf-no)
32 ?*)
conf-no))
;;; ================================================================
......
......@@ -899,6 +899,8 @@ Text:
(kom-review-by-to "Review last")
(kom-review-first "Review first")
(kom-view-commented-text "Review (the) commented (article)")
(kom-view-previous-commented-text
"Review (the) previouls commented (article)")
(kom-review-stack "Review stack")
(kom-review-presentation "Review presentation")
(kom-review-backward "(Review) Backwards")
......
No preview for this file type
......@@ -181,34 +181,42 @@ Args: BY TO NUM"
;;; ================================================================
;;; lyskom-get-texts-by-and-to
;;; Author: David Byers
;;;
;;; Conceptual algorithm:
;;;
;;; Get a segment from the start or end of the person's map of created
;;; texts and the conference's map of texts whose intersection
;;; contains at least NUM texts. Calculate the intersection and return
;;; the NUM first or last texts in the intersection.
;;;
;;; Real algorithm:
;;;
;;; In each iteration, get INCREMENT new texts from the person's map
;;; (call these BY) and the conference's map (call these TO).
;;; Calculate the intersection between TO and all previous BYs (call
;;; these BY1, BY2 ... BYi) and prepend this to the result list. Next
;;; calculate the intersection between BY and all previous TOs (call
;;; these TO1, TO2 ... TOi) and concatenate the result to the
;;; corresponding element in the result list. At this point, the
;;; concatenation of all elements of the result list will be the
;;; intersection between the concatenation of all BYi's and all TOi's.
;;;
;;; When the intersection is large enough, concatenate the results in
;;; the proper order and return NUM texts from the beginning or end of
;;; the results.
;;;
;;; The tricky iteration ensures that we don't do any redundant
;;; intersection calculations.
;;;
;;; Author: David K}gedal
(defmacro lyskom-bat-advance-by-list ()
(` (if (cdr by-list)
(setq by-list (cdr by-list))
(setq by-list (nreverse
(lyskom-remove-zeroes
(listify-vector
(map->text-nos
(blocking-do 'get-created-texts
(pers-stat->pers-no persstat)
(if (< num 0)
pmark
(- pmark (1- increment)))
increment))))))
(if (> num 0)
(setq pmark (- pmark increment))
(setq pmark (+ pmark increment))))))
(defmacro lyskom-bat-advance-to-list ()
(` (if (cdr to-list)
(setq to-list (cdr to-list))
(setq to-list (nreverse
(lyskom-remove-zeroes
(listify-vector
(map->text-nos
(blocking-do 'get-map
(conf-stat->conf-no confstat)
(if (< num 0)
cmark
(- cmark (1- increment)))
increment))))))
(if (> num 0)
(setq cmark (- cmark increment))
(setq cmark (+ cmark increment))))))
(defun lyskom-get-texts-by-and-to (persno confno num)
"Get NUM texts written by person PERSNO with conference CONFNO as a
......@@ -229,89 +237,41 @@ Args: persno confno num"
(clow (conf-stat->first-local-no confstat))
(chigh (1- (+ clow (conf-stat->no-of-texts confstat))))
(cmark (if (< num 0) clow chigh)))
(while (and (<= pmark phigh)
(<= cmark chigh)
(>= pmark plow)
(>= cmark clow)
(> (abs num) result-size))
(setq by (lyskom-remove-zeroes
(listify-vector
(map->text-nos
(blocking-do 'get-created-texts
(pers-stat->pers-no persstat)
(if (< num 0)
pmark
(- pmark (1- increment)))
increment))))
to (lyskom-remove-zeroes
(listify-vector
(map->text-nos
(blocking-do 'get-map
(conf-stat->conf-no confstat)
(if (< num 0)
cmark
(- cmark (1- increment)))
increment)))))
;;
;; Add intersection between new TO and old BYs
;; to the results list.
;;
(setq result-list
(cons (apply 'nconc
(mapcar
(function
(lambda (x)
(lyskom-intersection to x)))
by-list))
result-list))
;;
;; Add new BY and TO to the by-list and to-list
;;
(setq by-list (cons by by-list)
to-list (cons to to-list))
;; Initialize by-list and to-list
(lyskom-bat-advance-to-list)
(lyskom-bat-advance-by-list)
;; The real work below
(while (and (< result-size num)
by-list
to-list)
(cond (;; We have found a text in both lists. Then we add it to
;; result-list and move on.
(= (car by-list) (car to-list))
(setq result-list (cons (car by-list) result-list))
(lyskom-bat-advance-to-list)
(lyskom-bat-advance-by-list)
(++ result-size))
;; We know that the first text on to-list can't be on
;; by-list. So we skip it and move on.
((or (and (< num 0) (> (car by-list) (car to-list)))
(and (> num 0) (< (car by-list) (car to-list))))
(lyskom-bat-advance-to-list))
;; We know that the first text on by-list can't be on
;; to-list. So we skip it and move on.
(t
(lyskom-bat-advance-by-list))))
;; If we were searching from lower numbers, the resulting list
;; will be reversed.
(if (< num 0)
(setq result-list (nreverse result-list)))
result-list))
;;
;; Add intersections between new BY and all TOs
;;
(setq result-list
(mapcar2 (function
(lambda (x y)
(lyskom-intersection y
(nconc x by))))
result-list
to-list))
(setq result-size (apply '+ (mapcar 'length result-list)))
;;
;; Adjust the marks
;;
(if (> num 0)
(setq pmark (- pmark increment)
cmark (- cmark increment))
(setq pmark (+ pmark increment)
cmark (+ cmark increment))))
;;
;; Extract results
;;
(setq result-list
(apply 'nconc (if (< num 0)
(nreverse result-list)
result-list)))
(if (> num 0)
(nthcdr (- (length result-list) num) result-list)
(nfirst (- (length result-list) (- num)) result-list))))
;;; ===============================================================
;;; lyskom-get-texts-generic
......
......@@ -918,6 +918,8 @@ Text:
(kom-review-by-to "\305terse senaste")
(kom-review-first "\305terse f\366rsta")
(kom-view-commented-text "\305terse det kommenterade")
(kom-view-previous-commented-text
"\305terse det f\366reg\345ende kommenterade")
(kom-review-stack "\305terse lista")
(kom-review-presentation "\305terse presentation")
(kom-review-backward "(\305terse) Bakl\344nges")
......
......@@ -148,6 +148,14 @@ position (generally the most recent prompt) will alsways be visisble.
This variable is stored in the LysKOM server.")
;; Should this be set to nil if baud-rate is low?
;; This is set to nil until we are sure that it works OK.
(defvar kom-delayed-printing nil
"*Non-nil means delay printing of some information not in the cache.
You might want to turn this off to have the old, linear behaviour.
This variable is not stored in the LysKOM server.")
(defvar kom-higher-priority-breaks nil
"*Non-nil means allow texts from conferences with highter priority to break in.
If the value is 'express then texts are allowed to break in the middle of a
......
......@@ -433,42 +433,62 @@ Args: TEXT-STAT of the text being read."
(lyskom-print-header-comm (misc-info->footn-in misc) misc))))))
(defun lyskom-print-header-comm (text misc)
"Get author of TEXT-NO and print a header line."
(let ((text-stat (blocking-do 'get-text-stat text)))
;;+++ error kommer att se annorlunda ut.
(let ((text-stat (if kom-delayed-printing
(cache-get-text-stat text)
(blocking-do 'get-text-stat text)))
(marker (point-max-marker)))
(if text-stat
(progn
(lyskom-print-delayed-header-comm text-stat misc marker 0))
(lyskom-insert "[...]\n")
(initiate-get-text-stat 'background 'lyskom-print-delayed-header-comm
text misc marker 6))))
(defun lyskom-print-delayed-header-comm (text-stat misc marker chars-to-delete)
"Get author of TEXT-NO and print a header line."
;;+++ error kommer att se annorlunda ut.
(save-excursion
(goto-char (+ marker chars-to-delete))
(if text-stat
(let ((author (text-stat->author text-stat))
(type (misc-info->type misc)))
(cond
((eq type 'COMM-TO)
(lyskom-format-insert 'comment-to-text-by
(misc-info->comm-to misc)
author))
(lyskom-format-insert-at-point 'comment-to-text-by
(misc-info->comm-to misc)
author))
((eq type 'FOOTN-TO)
(lyskom-format-insert 'footnote-to-text-by
(misc-info->footn-to misc)
author))
(lyskom-format-insert-at-point 'footnote-to-text-by
(misc-info->footn-to misc)
author))
((eq type 'COMM-IN)
(lyskom-format-insert 'comment-in-text-by
(misc-info->comm-in misc)
author))
(lyskom-format-insert-at-point 'comment-in-text-by
(misc-info->comm-in misc)
author))
((eq type 'FOOTN-IN)
(lyskom-format-insert 'footnote-in-text-by
(misc-info->footn-in misc)
author)))
(lyskom-format-insert-at-point 'footnote-in-text-by
(misc-info->footn-in misc)
author)))
;; Print information about who added the link
(if (misc-info->sent-at misc)
(lyskom-format-insert 'send-at
(lyskom-return-date-and-time
(misc-info->sent-at misc))))
(lyskom-format-insert-at-point 'send-at
(lyskom-return-date-and-time
(misc-info->sent-at misc))))
(if (misc-info->sender misc)
(lyskom-insert (lyskom-format 'sent-by (misc-info->sender misc)))))
(lyskom-format-insert-at-point 'sent-by
(misc-info->sender misc))))
;; Client tolerance agains buggy servers...
;; We are writing the line about what comments exists and
;; the reference text does not exist anymore. Strange.
nil)))
nil)
(goto-char marker)
(set-marker marker nil)
(delete-char chars-to-delete)))
......
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