Commit 9b67c115 authored by David Byers's avatar David Byers
Browse files

Förbättringar i review.el, bugfixar

parent 388c5e44
Thu May 9 11:50:39 1996 David Byers <davby@sen2.ida.liu.se>
* commands1.el (kom-list-clients): Lade till en kommentar.
* services.el (initiate-find-next-text-no): Ny funktion.
(initiate-find-previous-text-no): Ny funktion.
* swedish-strings.el,english-strings.el (lyskom-strings): Lade till
cant-review-everything.
* review.el (lyskom-get-texts-globally): Ny funktion.
(lyskom-get-texts-by-to): Anropa lyskom-get-texts-globally fr att
tserse globalt. (lyskom-review-by-to): Tillt terse av alla till
allt.
Wed May 8 01:10:11 1996 David Kgedal <davidk@lysator.liu.se>
* deferred-insert.el (lyskom-deferred-insert-conf): Gissa om det
......@@ -20,6 +35,12 @@ Wed May 8 01:10:11 1996 David K
* deferred-insert.el (lyskom-replace-deferred): Var lite mer
defensiv i scrollningen. Dvs. scrolla aldrig.
Tue May 7 11:00:46 1996 David Byers <davby@sen2.ida.liu.se>
* review.el (lyskom-review-by-to): Anvnd blocking-do-multiple fr att
snabba upp frsta utskriften. (lyskom-get-texts-by-and-to): Anvnd
blocking-do-multiple fr att skynda p uppstarten.
Tue May 7 03:18:48 1996 David Kgedal <davidk@lysator.liu.se>
* lyskom-rest.el (lyskom-start-of-command): Hoppa till slutet p
......@@ -33,7 +54,6 @@ Tue May 7 03:18:48 1996 David K
* lyskom-rest.el (kom-page-next-command): Dito.
(kom-view,lyskom-start-of-command): Dito.
* lyskom-rest.el (lyskom-insert): Frskte gra s att den inte
hoppar ner s ofta.
......@@ -66,6 +86,21 @@ Mon May 6 00:27:19 1996 David K
funktion.
(lyskom-deferred-insert-conf): Gr om drefter.
Sun May 5 12:53:49 1996 David Byers <davby@sen2.ida.liu.se>
* remote-control.el (lyskom-remote-list-messages-1): Lista i rtt
ordning. En fatal bug rttad. (lyskom-remote-list-messages): Lista
meddelanden i rtt ordning. (lyskom-remote-erase-messages): Rttade en
fatal bug.
* completing-read.el (lyskom-read-conf-name-internal): Lade till
predikatet persnone fr att stda ndringen i kom-start-anew.
(lyskom-read-conf-name-internal-verify-type): Lade till predikatet
persnone.
* startup.el (kom-start-anew): kom-start-anew lser in personnamn s
att gamla personer har prioritet ver nya.
Sun May 5 03:18:19 1996 David Kgedal <davidk@lysator.liu.se>
* Makefile (PARTS-EL): Flyttade deferred-insert.el till HEADER-EL.
......
......@@ -3,6 +3,13 @@ Att g
Buggar
LysKOMs completing-read är skit. Den gör fel. Den borde skrivas om.
lyskom-try-complete-partials borde returnera exakta matchar före
längsta match. Nu blir (lyskom-try-complete-partials "link"
'(("(foo) link (bar)" . 1) ("linkfoobar" . 2))) "linkfoobar", inte
"(foo) link (bar)".
Om ett namn som fylls i i efterhand gör att raden blir för lång,
så scrollar klienten ibland trots att den inte borde.
......@@ -17,7 +24,7 @@ Buggar
Fotnoter som visas på en gång filtreras inte.
M-> i prioritera-bufferten. Text 1320736.
M-> i prioritera-bufferten. Text 1320736. (FIXAT)
Det har hänt att call-info har blivit nil i lyskom-parse-error.
......@@ -26,9 +33,9 @@ Buggar
att gå med i möten om man ger dem fel prioritet.
Om man försöker logga in med en förkortning som matchar flera namn
tror klienten att man inte finns.
tror klienten att man inte finns. (FIXAT?)
Lista meddelanden via fjärrkontroll listar baklänges.
Lista meddelanden via fjärrkontroll listar baklänges. (FIXAT)
Allmänna förbättringar
......@@ -37,7 +44,7 @@ Allm
och det som står inom parentesen precis efter inläggstexten, så
vill man antagligen inte återse det, eftersom man ju bevisligen
har det framför sig. I stället vill man antagligen kommentera
det.
det. (IGNORERAT FÖR TILLFÄLLET -- JAG GILLADE DET INTE /dcb)
Har detta att göra med lite för optimistisk cache att göra? Kanske
bör man läsa om person-staten innan man varnar för lapp på dörren?
......@@ -55,7 +62,3 @@ Allm
Återinför Olästa
Man skall få en lista av alternativ om man matar in ett namn som
har flera kompletteringar när man loggar in. Skall vi använda en
riktig completing-read vid inloggningen? Se inlägg 1375140
(markerat av David Byers) i LysKOM.
......@@ -1409,6 +1409,7 @@ If MARK-NO == 0, review all marked texts."
((nil 4 30 nil nil nil) . cgdag)
((nil 6 6 nil nil nil) . sixjune)
((nil 8 15 nil nil nil) . holdnose)
((nil 3 29 nil nil nil) . lysbday)
))
......@@ -1534,6 +1535,9 @@ If MARK-NO == 0, review all marked texts."
"\n"))
(lyskom-insert (lyskom-format 'total-users total-users))))
;;; =====================================================================
;;; Lista klienter - List clients
;;; Author: David Kågedal
(def-kom-command kom-list-clients ()
......
......@@ -187,7 +187,10 @@ Logins is a list of conf-nos (only significant when PREDICATE is logins)."
(and (eq predicate 'conflogin)
(or (not (conf-type->letterbox
(conf-stat->conf-type cs)))
(memq (conf-stat->conf-no cs) logins)))))
(memq (conf-stat->conf-no cs) logins)))
(and (eq predicate 'persnone)
(or (null cs)
(conf-type->letterbox (conf-stat->conf-type cs))))))
(defun lyskom-read-conf-name-internal (string predicate all)
......@@ -198,6 +201,8 @@ PREDICATE is one of:
* confs only conferences
* pers only persons
* logins only persons that are logged in right now.
* conflogin union of confs and logins
* persnone only existing persons and strings that are not prefixes of existing persons.
If third argument ALL is t then we are called from all-completions.
If third argument ALL is nil then we are called from try-completion.
If third argument ALL is 'conf-no then we are called from lyskom name
......@@ -209,7 +214,7 @@ to conf-no translator."
(eq predicate 'conflogin))
(lyskom-completing-lookup-name string)))
(nos (listify-vector (conf-list->conf-nos list)))
(parlist (if (memq predicate '(pers confs conflogin))
(parlist (if (memq predicate '(pers confs conflogin persnone))
(let ((nos nos)
(typs (listify-vector
(conf-list->conf-types list)))
......@@ -237,7 +242,7 @@ to conf-no translator."
(conf-type->letterbox (cdr par)))
(list (car par)))))
parlist)))
((eq predicate 'pers)
((memq predicate '(pers persnone))
(apply 'append
(mapcar (function
(lambda (par)
......@@ -323,7 +328,9 @@ to conf-no translator."
;; to a prefix that was also a match, which would be accepted!
;;
((eq all 'lambda)
(= (length mappedlist) 1))
(or (= (length mappedlist) 1)
(and (null mappedlist)
(eq predicate 'persnone))))
;;
;; Called from all-completions. Returns a list of all possible
......@@ -344,7 +351,10 @@ to conf-no translator."
predicate
logins)))
(cons string names)
names)))
(if (and (eq predicate 'persnone)
(null names))
(list string)
names))))
;;
;; No completions available on the string and we were called from
......@@ -393,7 +403,9 @@ to conf-no translator."
(if (string= string (car (car strings)))
t ; Exact
(car (car strings))))
(t (lyskom-try-complete-partials string strings))))))))
(t (or (lyskom-try-complete-partials string strings)
(and (eq predicate 'persnone)
(list string))))))))))
(defun lyskom-try-complete-partials (string alist)
......
......@@ -343,7 +343,10 @@ and you have finished reading. Please come back later.
(newyearday . "\nMay %#1d be a prosperous and good year for you!")
(newyeareve . "Happy New Year!")
(newyearevelate . "Less than an hour to go...")
(lysbday . "
On this day, in 1973, the Lysator Academic Computer Society was
formed, and it was a great day in the history of computing in Sweden.
Read all about it at http://www.lysator.liu.se/history/")
(total-users . " A total of %#1d users.\n")
(who-to-add-q . "Add who/what as a recipient: ")
(who-to-add-copy-q . "Add which conference/user as recipient of a carbon copy: ")
......@@ -563,6 +566,7 @@ Mark the envelope with \"LysKOM bug report\"\n\n")
(review-cant-read-conf . "You can't review articles to a closed conference you are not a member of.\n")
(review-cant-read-letterbox . "You can't review articles to somebody else's mailbox.")
(review-cant-read-empty . "The conference is empty.\n")
(cant-review-everything . "You cannot review every artible in LysKOM.\n")
; From edit-text.el:
(press-C-c-C-c . "Enter C-c C-c to post the article.")
......
......@@ -273,7 +273,7 @@ Handler to implement remote control of the ansaphone."
(lyskom-get-string 'ansaphone-no-messages))
(progn
(lyskom-collect 'follow)
(let ((tmp lyskom-ansaphone-messages))
(let ((tmp (reverse lyskom-ansaphone-messages)))
(while tmp
(initiate-get-conf-stat 'follow nil (elt (car tmp) 0))
(initiate-get-conf-stat 'follow nil (elt (car tmp) 1))
......@@ -283,7 +283,7 @@ Handler to implement remote control of the ansaphone."
(defun lyskom-remote-list-messages-1 (sender &rest pairs)
(let ((message "")
(tmp lyskom-ansaphone-messages)
(tmp (reverse lyskom-ansaphone-messages))
(from nil)
(to nil))
(while pairs
......@@ -300,8 +300,8 @@ Handler to implement remote control of the ansaphone."
(lyskom-ansaphone-send-message sender message)
(lyskom-insert-before-prompt
(lyskom-format (lyskom-get-string 'remote-list-messages)
(current-time-string)
sender))))
sender
(current-time-string)))))
......@@ -312,8 +312,8 @@ Handler to implement remote control of the ansaphone."
(lyskom-insert-before-prompt
(lyskom-format
(lyskom-get-string 'remote-erase-messages)
(current-time-string)
sender))
sender
(current-time-string)))
nil)
......
......@@ -130,9 +130,10 @@ The defaults for this command is the conference that you are in."
(lyskom-format 'review-info
(lyskom-format 'info-to-conf info))
'all
t
;; If person is not given we must give
;; conf
(not (zerop by))
;; conf -- Not anymore!
;; (not (zerop by))
(if (zerop lyskom-current-conf)
""
(conf-stat->name
......@@ -144,16 +145,17 @@ The defaults for this command is the conference that you are in."
(cache-del-conf-stat to))
(if (not (zerop by))
(cache-del-pers-stat by))
(let* ((info-by (if (zerop by)
(lyskom-get-string 'anybody)
(blocking-do 'get-conf-stat by)))
(info-to (if (zerop to)
(lyskom-get-string 'all-confs)
(blocking-do 'get-conf-stat to))))
(blocking-do-multiple ((info-by (get-conf-stat by))
(info-to (get-conf-stat to)))
(lyskom-format-insert 'review-info-by-to
info
info-by
info-to))
(if (zerop by)
(lyskom-get-string 'anybody)
info-by)
(if (zerop to)
(lyskom-get-string 'all-confs)
info-to)))
(condition-case arg
(let ((list (lyskom-get-texts-by-to by to count)))
......@@ -185,7 +187,7 @@ The defaults for this command is the conference that you are in."
"Get NUM texts writteb by person number BY in conference number TO
Args: BY TO NUM"
(cond ((and (zerop by)
(zerop to)) nil)
(zerop to)) (lyskom-get-texts-globally num))
((zerop to) (lyskom-get-texts-by by num))
((zerop by) (lyskom-get-texts-to to num))
(t (lyskom-get-texts-by-and-to by to num))))
......@@ -227,6 +229,33 @@ This function signals an error if review is impossible"
;;; ============================================================
;;; lyskom-get-texts-globally
;;; Author: Per Cederquist, David Byers
;;;
(defun lyskom-get-texts-globally (num)
"Get the last NUM texts created in LysKOM"
(if (null num)
(progn
(lyskom-format-insert 'cant-review-everything)
(signal 'lyskom-cant-review-error t)))
(let ((result nil)
(textno (if (< num 0)
1
(lyskom-maxint)))
(op (if (< num 0)
'find-next-text-no
'find-previous-text-no)))
(while (and (not (eq textno 0))
(< (length result) (abs num)))
(setq textno (blocking-do op textno))
(setq result (cons textno result)))
(if (< num 0)
(nreverse result)
result)))
;;; ================================================================
;;; lyskom-get-texts-by-and-to
......@@ -291,8 +320,8 @@ This function signals an error if review is impossible"
"Get NUM texts written by person PERSNO with conference CONFNO as a
recipient.
Args: persno confno num"
(let ((persstat (blocking-do 'get-pers-stat persno))
(confstat (blocking-do 'get-conf-stat confno)))
(blocking-do-multiple ((persstat (get-pers-stat persno))
(confstat (get-conf-stat confno)))
(lyskom-check-review-access confstat persstat)
(let* ((result-list nil)
......
......@@ -262,6 +262,18 @@ a conf-type (with several bits that are 't' or 'nil' that is)."
(lyskom-send-packet kom-queue (lyskom-format-objects 24 text-no mark-type)))
(defun initiate-find-next-text-no (kom-queue handler text-no &rest data)
"Find the text following the text TEXT-NO"
(lyskom-call kom-queue lyskom-ref-no handler data 'lyskom-parse-num)
(lyskom-send-packet kom-queue (lyskom-format-objects 60 text-no)))
(defun initiate-find-previous-text-no (kom-queue handler text-no &rest data)
"Find the text preceding the text TEXT-NO"
(lyskom-call kom-queue lyskom-ref-no handler data 'lyskom-parse-num)
(lyskom-send-packet kom-queue (lyskom-format-objects 61 text-no)))
(defun initiate-get-text (kom-queue handler text-no &rest data)
"Get text from LysKOM server.
Args: KOM-QUEUE HANDLER TEXT-NO &rest DATA."
......
......@@ -182,7 +182,7 @@ See lyskom-mode for details."
nil
(let ((name (lyskom-read-conf-name
(lyskom-get-string 'what-is-your-name)
'pers nil "")))
'persnone t "")))
(setq lyskom-pers-no
(or (lyskom-read-conf-name-internal name 'pers 'conf-no)
(lyskom-create-new-person name)))))
......
......@@ -345,6 +345,9 @@ du har l\344st klart allting. Kom tillbaks senare.
(cgdag . "Konungens fdelsedag")
(sixjune . "Sveriges nationaldag och svenska flaggans dag")
(holdnose . "Hll fr nsan...")
(lysbday . "
P\345 denna dag, \345r 1973, grundades Lysator, och det var en stor dag
i svensk datorhistoria. L\344s mer p http://www.lysator.liu.se/history/")
(total-users . " Sammanlagt %#1d anv\344ndare.\n")
......@@ -580,6 +583,7 @@ M\344rk kuvertet \"LysKOM buggrapport f\366r elispklienten\".\n\n")
(review-cant-read-conf . "Du kan inte \345terse inl\344gg till ett slutet m\366te du inte \345r med i.\n")
(review-cant-read-letterbox . "Du kan inte \345terse in\344gg till n\345gon annans brevl\345da.\n")
(review-cant-read-empty . "M\366tet r tomt.\n")
(cant-review-everything . "Du kan inte \345terse alla texter i LysKOM.\n")
; From edit-text.el:
(press-C-c-C-c . "Tryck C-c C-c f\366r att skicka in texten.")
......
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