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

Minor bug fixes

parent d16b4a56
2000-06-05 David Byers <>
* utilities.el (lyskom-read-text-no-prefix-arg): Don't use zerop
on something that might be a symbol
* review.el (kom-review-comments): Fixed nesting error that caused
this command not to work at all.
2000-06-04 David Byers <>
Experimantal special handling of attachments:
* view-text.el (lyskom-insert-deferred-header-comm): Use
(lyskom-follow-comments): Same here.
(lyskom-insert-deferred-header-comm): Same here.
(lyskom-insert-header-comm): Same here.
(lyskom-skip-attachments): New function.
(lyskom-get-text-attachments): New function.
(lyskom-follow-comments): Skip and mark attachments as read (if
2000-06-04 Per Cederqvist <ceder@moria>
* edit-text.el (lyskom-edit-send-check-recipients): The code that
......@@ -7,6 +28,21 @@
2000-06-02 David Byers <>
* view-text.el (lyskom-follow-comments): Don't follow attachments
unless kom-follow-attachments is set.
* (kom-follow-attachments): New variable.
* view-text.el (lyskom-view-text): Removed SOJGE code.
(lyskom-follow-comments): Removed SOJGE code. Get mx-attachments
from text.
(lyskom-view-text-handle-saved-comments): Removed SOJGE code.
* (kom-w3-simplify-body): Removed SOJGE code
(kom-no-comments-to-motd, lyskom-show-comments)
* startup.el (kom-start-anew): Removed SOJGE code.
* lyskom-rest.el (kom-save-text): Use lyskom-saved-file to save
the most recently specified file name.
......@@ -5,6 +5,22 @@ Att g
Kommentera inlägg med vänner borde kolla om man försöker kommentera en
bilaga. I så fall borde man få förslag att kommentera "urinlägget"
istället. Klienten får följa "belongs-to"-länkarna uppåt.
Inför en ATTACHMENT-IN type i read-listan som komplement till COMM-IN.
Prompten blir läsa nästa bilaga.
Det går inte att konsekvent få se "bilaga" istället för "text" eller
"inlägg" eftersom man inte alltid har text-staten i tid. Till exempel
slipper man nog när man bygger kontextmenyn för inläggsnumret.
Om man vill få se "återse nästa bilaga" när man gör åak, åar, åt så
behöve ett komplement till REVIEW-TREE och REVIEW. Man måste ha
text-staten när man skapar entryt för att kunna titta på mx-belongs-to
innan man stoppar in det i read-listan.
Använd lyskom-read-text-no-prefix arg i alla funktioner där det är
meningsfullt. Följande är relevanta:
......@@ -1199,12 +1199,12 @@ end."
"View the comments to this text.
If the current text has comments in (footnotes in) some texts then the first
text is shown and a REVIEW list is built to shown the other ones."
(interactive (list (lyskom-read-text-no-prefix-arg 'review-comments-q))
(interactive (list (lyskom-read-text-no-prefix-arg 'review-comments-q)))
(lyskom-tell-internat 'kom-tell-review)
(cond (text-no
(blocking-do 'get-text-stat text-no)))
(t lyskom-insert-string 'read-text-first))))
(t lyskom-insert-string 'read-text-first)))
(defun lyskom-review-comments (text-stat)
......@@ -526,9 +526,7 @@ See lyskom-mode for details."
(/= (conf-stat->msg-of-day conf-stat) 0))
(lyskom-insert-string 'you-have-motd)
(let ((lyskom-show-comments ; +++SOJGE
(not kom-no-comments-to-motd)))
(lyskom-view-text (conf-stat->msg-of-day conf-stat)))))
(lyskom-view-text (conf-stat->msg-of-day conf-stat))))
(if (and conf-stat
(zerop (conf-stat->presentation conf-stat))
(not (zerop (conf-stat->no-of-texts conf-stat))))
......@@ -525,7 +525,7 @@ last-written means use the text most recently written. The symbol
last-seen-written means use the text in lyskom-last-seen-written.
A number means use that text as the default."
(let ((default (cond ((or (null default)
(zerop default))
(eq 0 default))
(lyskom-default-value 'lyskom-current-text))
((numberp default) default)
((eq default 'last-written)
......@@ -359,6 +359,10 @@ If this variable is nil, texts with no recipient you are a member of
will not be shown."
(def-kom-var kom-follow-attachments t
"*Follow attachments as if they are regular comments."
;;(def-kom-var kom-who-buffer-size-when-displaying 10
;; "Size of window to display the who-buffer.
;;This is used when executing the kom-display-who-buffer command."
......@@ -1952,12 +1956,6 @@ an unknown person.")
(def-kom-var lyskom-allow-missing-subject nil
"If non-nil allow texts without subjects.")
(def-kom-var lyskom-show-comments t
"This should always be set to t.") ;+++SOJGE
(def-kom-var kom-no-comments-to-motd nil
"This should always be set to nil unless you are Klaus Zeuge.") ;+++SOJGE
(def-kom-var kom-w3-simplify-body t
"*Strip color information from body tag."
......@@ -224,11 +224,10 @@ Note that this function must not be called asynchronously."
((eq type 'COMM-IN)
(if kom-reading-puts-comments-in-pointers-last
(if lyskom-show-comments ; +++SOJGE
(misc-info->comm-in misc)
(misc-info->comm-in misc)
((eq type 'FOOTN-IN)
(if kom-reading-puts-comments-in-pointers-last
......@@ -382,7 +381,9 @@ lyskom-reading-list."
;; . Fix the reading-list
;; . Issue cache-filling initiate-calls for everything left comments.
(let (flist clist)
(let ((flist nil)
(clist nil)
(mx-attachments-in (lyskom-get-text-attachments text-stat)))
(lyskom-traverse misc (text-stat->misc-info-list text-stat)
((and (eq (misc-info->type misc) 'FOOTN-IN)
......@@ -395,18 +396,22 @@ lyskom-reading-list."
((eq (misc-info->type misc) 'FOOTN-IN)
(setq flist (cons (misc-info->footn-in misc) flist)))
((eq (misc-info->type misc) 'COMM-IN)
(if lyskom-show-comments ; +++SOJGE
(setq clist (cons (misc-info->comm-in misc) clist))))))
(setq clist (cons (misc-info->comm-in misc) clist)))))
(let (comments footnotes)
;; Find the comments that we should read and enter them into the
;; read-list.
(lyskom-traverse no clist
(let ((text-stat (blocking-do 'get-text-stat no)))
(if (or review-tree
(and text-stat
(not (lyskom-text-read-p text-stat))))
(setq comments (cons no comments)))))
(cond ((or review-tree
(not (memq no mx-attachments-in)))
(let ((text-stat (blocking-do 'get-text-stat no)))
(if (or review-tree
(and text-stat
(not (lyskom-text-read-p text-stat))))
(setq comments (cons no comments)))))
((memq no mx-attachments-in)
(lyskom-skip-attachments no mark-as-read))))
(if comments
(if review-tree
......@@ -438,6 +443,44 @@ lyskom-reading-list."
(text-stat->text-no text-stat))
lyskom-reading-list t)))))
(defun lyskom-get-text-attachments (text-stat)
"Return a list of all attachments to TEXT-STAT."
(lambda (el)
(string-to-number (aux-item->data el)))
(lyskom-get-aux-item (text-stat->aux-items text-stat) 10101)))
(defun lyskom-skip-attachments (text-no mark-as-read)
"Skip the hierarchy of attachments starting at text-no"
(let ((queue (list text-no))
(done nil)
(tmp (make-collector))
(result nil))
;; Note: this does block the client, but explicitly checks that
;; it is not being called from under the parser (where it
;; really doesn't make a whole lot of sense anyway), so
;; we ought to be OK anyway.
(unless lyskom-is-parsing
(while queue
(while queue
(when (not (memq (car queue) done))
(initiate-get-text-stat 'background
(car queue)
(setq queue (cdr queue))
(setq done (cons (car queue) done))))
(lyskom-wait-queue 'background)
(setq result (nconc result (collector->value tmp)))
(lyskom-traverse text-stat (collector->value tmp)
(setq queue (nconc queue (lyskom-get-text-attachments text-stat)))))
(lyskom-traverse text-stat result
(read-list-delete-text (text-stat->text-no text-stat) lyskom-reading-list)
(read-list-delete-text (text-stat->text-no text-stat) lyskom-to-do-list)
(if mark-as-read (lyskom-is-read-handler text-stat))))))
(defun lyskom-fetch-text-for-cache (text-stat)
"Fetches the author and other things of a text and does nothing with it."
......@@ -914,8 +957,7 @@ Args: TEXT-STAT of the text being read."
(let ((type (misc-info->type misc)))
((eq type 'COMM-IN)
(if lyskom-show-comments ;+++SOJGE
(lyskom-print-header-comm (misc-info->comm-in misc) misc text-stat)))
(lyskom-print-header-comm (misc-info->comm-in misc) misc text-stat))
((eq type 'FOOTN-IN)
(lyskom-print-header-comm (misc-info->footn-in misc) misc text-stat))))))
......@@ -959,10 +1001,7 @@ Args: TEXT-STAT of the text being read."
(type (misc-info->type misc))
(mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 17)))
(mx-author (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 16)))
(mx-attachments-in (mapcar
(lambda (el)
(string-to-number (aux-item->data el)))
(lyskom-get-aux-item (text-stat->aux-items read-text-stat) 10101)))
(mx-attachments-in (lyskom-get-text-attachments text-stat))
(mx-belongs-to (mapcar
(lambda (el)
(string-to-number (aux-item->data el)))
......@@ -1021,10 +1060,7 @@ Args: TEXT-STAT of the text being read."
(mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 17)))
(mx-author (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 16)))
(mx-attachments-in (mapcar
(lambda (el)
(string-to-number (aux-item->data el)))
(lyskom-get-aux-item (text-stat->aux-items read-text-stat) 10101)))
(mx-attachments-in (lyskom-get-text-attachments text-stat))
(mx-belongs-to (mapcar
(lambda (el)
(string-to-number (aux-item->data el)))
Supports Markdown
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