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

Format komimportmail imported e-mail properly.

Commands to insert info node references.
parent b79dde16
1999-10-09 David Byers <davby@ida.liu.se>
* view-text.el: Updated all functions to format imported e-mail
properly
1999-09-29 David Byers <davby@ida.liu.se>
* edit-text.el (kom-insert-last-info-nodename): New command.
(kom-yank-info-nodename): New command.
1999-08-28 David Byers <davby@ida.liu.se>
* completing-read.el (lyskom-read-session-resolve-ambiguity): Bug
fix in printing session list.
Tue Sep 28 14:56:43 1999 David Byers <davby@sen2.ida.liu.se> Tue Sep 28 14:56:43 1999 David Byers <davby@sen2.ida.liu.se>
* Released 0.46-BETA-7 * Released 0.46-BETA-7
......
...@@ -3,9 +3,18 @@ ...@@ -3,9 +3,18 @@
Att göra i elisp-klienten Att göra i elisp-klienten
========================= =========================
Någon form at reply till importerade brev som använder mx-reply-to
eller mx-to, mx-cc om de finns.
Om du fixar någonting som står med på den här Om du fixar någonting som står med på den här
listan, glöm inte att ta bort det från listan! listan, glöm inte att ta bort det från listan!
Testa vad som händer om man har en ogiltig misc-item eller aux-item i
headersarna när man adderar en mottagare eller flyttar ett inlägg
eller adderar en aux-item eller tar bord en aux-item.
initiate-get-membership skulle kunna fylla i positionen för initiate-get-membership skulle kunna fylla i positionen för
medlemskapet automatiskt. Tyvärr går det inte att göra så i medlemskapet automatiskt. Tyvärr går det inte att göra så i
query-read-texts. query-read-texts.
......
...@@ -278,10 +278,7 @@ this function shall be with current-buffer the BUFFER." ...@@ -278,10 +278,7 @@ this function shall be with current-buffer the BUFFER."
(lyskom-format-insert-before-prompt 'no-longer-member-n conf-no)) (lyskom-format-insert-before-prompt 'no-longer-member-n conf-no))
(lyskom-remove-membership conf-no lyskom-membership) (lyskom-remove-membership conf-no lyskom-membership)
(when (eq conf-no lyskom-current-conf) (when (eq conf-no lyskom-current-conf)
(set-read-list-empty lyskom-reading-list) (lyskom-leave-current-conf))
(lyskom-run-hook-with-args 'lyskom-change-conf-hook
lyskom-current-conf 0)
(setq lyskom-current-conf 0))
(read-list-delete-read-info conf-no lyskom-to-do-list) (read-list-delete-read-info conf-no lyskom-to-do-list)
(lyskom-update-prompt)) (lyskom-update-prompt))
...@@ -303,10 +300,7 @@ this function shall be with current-buffer the BUFFER." ...@@ -303,10 +300,7 @@ this function shall be with current-buffer the BUFFER."
(cond ((membership-type->passive (membership->type membership)) (cond ((membership-type->passive (membership->type membership))
(lyskom-replace-membership membership lyskom-membership) (lyskom-replace-membership membership lyskom-membership)
(when (eq conf-no lyskom-current-conf) (when (eq conf-no lyskom-current-conf)
(set-read-list-empty lyskom-reading-list) (lyskom-leave-current-conf))
(lyskom-run-hook-with-args 'lyskom-change-conf-hook
lyskom-current-conf 0)
(setq lyskom-current-conf 0))
(read-list-delete-read-info conf-no lyskom-to-do-list) (read-list-delete-read-info conf-no lyskom-to-do-list)
(lyskom-update-prompt)) (lyskom-update-prompt))
......
...@@ -107,6 +107,13 @@ return non-nil if the item is to be included in the list." ...@@ -107,6 +107,13 @@ return non-nil if the item is to be included in the list."
(setq item-list (cdr item-list))) (setq item-list (cdr item-list)))
(nreverse result))) (nreverse result)))
(defun lyskom-get-aux-item (item-list tag)
"Return all aux-items in ITEM-LIST with tag TAG."
(lyskom-match-aux-items item-list
(lambda (el) (eq (aux-item->tag el) tag))))
(defun lyskom-aux-item-terminating-button (item obj) (defun lyskom-aux-item-terminating-button (item obj)
(if obj (if obj
(lyskom-format " %#1@%[[*]%]" (lyskom-format " %#1@%[[*]%]"
......
...@@ -2248,3 +2248,17 @@ Return-value: 'no-session if there is no suitable session to switch to ...@@ -2248,3 +2248,17 @@ Return-value: 'no-session if there is no suitable session to switch to
(lyskom-create-aux-item-flags (lyskom-create-aux-item-flags
nil nil nil nil nil nil nil nil) 0 "")))) nil nil nil nil nil nil nil nil) 0 ""))))
(cache-del-text-stat text-no))))))) (cache-del-text-stat text-no)))))))
(def-kom-command kom-review-mail-headers (&optional text-no)
"Review the mail headers of an imported message"
(interactive (list (lyskom-read-text-no-prefix-arg
'review-mail-headers-to-what t)))
(let* ((text-stat (blocking-do 'get-text-stat text-no))
(headers (and text-stat (lyskom-get-aux-item (text-stat->aux-items text-stat) 24))))
(cond ((null text-stat) (lyskom-format-insert 'no-such-text-no text-no))
((null headers) (lyskom-format-insert 'no-mail-headers text-no))
(t (lyskom-format-insert 'mail-headers-for text-no)
(mapcar (lambda (el)
(lyskom-insert (aux-item->data el))
(lyskom-insert "\n"))
headers)))))
...@@ -953,9 +953,8 @@ the LysKOM rules of string matching." ...@@ -953,9 +953,8 @@ the LysKOM rules of string matching."
lyskom-session-no) lyskom-session-no)
"*" " ")) "*" " "))
(session-info->pers-no info) (session-info->pers-no info)
(if (uconf-stat->name confconfstat) (or confconfstat
confconfstat (lyskom-get-string 'not-present-anywhere)))
(lyskom-get-string 'not-present-anywhere)))
(lyskom-format-insert (lyskom-format-insert
format-string-p format-string-p
"" ""
......
...@@ -1033,6 +1033,31 @@ text is a member of some recipient of this text." ...@@ -1033,6 +1033,31 @@ text is a member of some recipient of this text."
(sit-for 0))) (sit-for 0)))
;;; ============================================================
;;; Info node stuff
(defun kom-yank-info-nodename ()
"Put the current Info-node on the kill-ring."
(interactive)
(kill-new (format "*Note %s: (%s)%s,"
Info-current-node
(file-name-nondirectory Info-current-file)
Info-current-node)))
(defun kom-insert-last-info-nodename ()
"Insert a reference to the most recently visited info node."
(interactive)
(condition-case nil
(let ((link nil))
(save-excursion
(set-buffer (get-buffer "*info*"))
(setq link (format "*Note %s: (%s)%s,"
Info-current-node
(file-name-nondirectory Info-current-file)
Info-current-node)))
(insert link))
(error (lyskom-message (lyskom-get-string 'cant-find-info-node)))))
;;; ================================================================ ;;; ================================================================
;;; Add recipient, copy-recipient - Addera mottagare ;;; Add recipient, copy-recipient - Addera mottagare
;;; ;;;
......
...@@ -760,6 +760,7 @@ Help: \\[describe-mode] ---") ...@@ -760,6 +760,7 @@ Help: \\[describe-mode] ---")
(no-get-text . "You were not allowed to retrieve the text.") (no-get-text . "You were not allowed to retrieve the text.")
(unknown-header . "Unknown header") (unknown-header . "Unknown header")
(transform-error . "Skicka in oformatterat (%#1s)? ") (transform-error . "Skicka in oformatterat (%#1s)? ")
(cant-find-info-node . "Can't find the info buffer")
; From view-text.el: ; From view-text.el:
(line . " /1 line/ ") (line . " /1 line/ ")
......
...@@ -768,6 +768,7 @@ Annat se \\[describe-mode] ---") ...@@ -768,6 +768,7 @@ Annat se \\[describe-mode] ---")
(no-get-text . "Du fick inte hmta texten.") (no-get-text . "Du fick inte hmta texten.")
(unknown-header . "Oknd information p raden") (unknown-header . "Oknd information p raden")
(transform-error . "Skicka in oformatterat (%#1s)? ") (transform-error . "Skicka in oformatterat (%#1s)? ")
(cant-find-info-node . "Hittar inte info-bufferten")
;; From view-text.el: ;; From view-text.el:
(line . " /1 rad/ ") (line . " /1 rad/ ")
...@@ -791,11 +792,17 @@ Annat se \\[describe-mode] ---") ...@@ -791,11 +792,17 @@ Annat se \\[describe-mode] ---")
(yesterday . "igr") (yesterday . "igr")
(no-such-text-no . "Det finns inget sdant inlgg. (%#1:n)\n") (no-such-text-no . "Det finns inget sdant inlgg. (%#1:n)\n")
(time-yyyy-mm-dd . "%4#1d-%02#2d-%02#3d") (time-yyyy-mm-dd . "%4#1d-%02#2d-%02#3d")
(text-created-at . "Skapad: %#1s\n")
(text-imported-at . "Importerad: %#1s\n")
(text-imported-at-by . "Importerad: %#1s av %#2P\n")
(head-Subject . "rende: ") (head-Subject . "rende: ")
(Recipient . "Mottagare") (Recipient . "Mottagare")
(Extra-recipient . "Extra kopia") (Extra-recipient . "Extra kopia")
(Hidden-recipient . "Fr knnedom") (Hidden-recipient . "Fr knnedom")
(mx-Recipient . "Extern mottagare")
(mx-Extra-recipient . "Extern kopiemottagare")
(mx-Extern-reply-to . "Externa svar till")
(Strange-recipient . "Underlig mottagare") (Strange-recipient . "Underlig mottagare")
(send-at . " Snt: %#1s\n") (send-at . " Snt: %#1s\n")
(sent-by . " Snt av %#1P\n") (sent-by . " Snt av %#1P\n")
...@@ -811,6 +818,12 @@ Annat se \\[describe-mode] ---") ...@@ -811,6 +818,12 @@ Annat se \\[describe-mode] ---")
(comment-in-text-by . "Kommentar i text %#1n av %#2P") (comment-in-text-by . "Kommentar i text %#1n av %#2P")
(footnote-in-text-by . "Fotnot i text %#1n av %#2P") (footnote-in-text-by . "Fotnot i text %#1n av %#2P")
(attachment-to-text . "Bilaga till text %#1n")
(attachment-in-text . "Bilaga i text %#1n")
(envelope-sender . "Snt av: %#1s\n")
(attachment-filename . "Bilagans filnamn: \"%#1s\"\n")
(written-by . " av %#1P\n") (written-by . " av %#1P\n")
;; From async.el: ;; From async.el:
...@@ -1338,6 +1351,12 @@ Du m ...@@ -1338,6 +1351,12 @@ Du m
(what-request-confirm-no . "Vilken text vill du ha lsbekrftelse till: ") (what-request-confirm-no . "Vilken text vill du ha lsbekrftelse till: ")
(adding-request-confirm . "Begr lsbekrftelse till inlgg %#1n...") (adding-request-confirm . "Begr lsbekrftelse till inlgg %#1n...")
(already-request-confirm . "Inlgg %#1n har redan begran om lsbekrftelse.\n") (already-request-confirm . "Inlgg %#1n har redan begran om lsbekrftelse.\n")
(review-mail-headers-to-what . "Vilken texts mailhuvuden vill du se? ")
(no-mail-headers . "Inlgg %#1n har inga mailhuvuden\n")
(mail-headers-for . "Mailheaders fr inlgg %#1n:\n")
(email-name-prefix . "")
(email-name-suffix . "")
)) ))
...@@ -1493,6 +1512,8 @@ Du m ...@@ -1493,6 +1512,8 @@ Du m
(kom-add-no-comments . "Frhindra kommentarer") (kom-add-no-comments . "Frhindra kommentarer")
(kom-add-private-answer . "Begr personligt svar") (kom-add-private-answer . "Begr personligt svar")
(kom-add-request-confirm . "Begr lsbekrftelse") (kom-add-request-confirm . "Begr lsbekrftelse")
(kom-review-mail-headers . "terse mailhuvuden")
)) ))
(lyskom-language-var lyskom-language-codes sv (lyskom-language-var lyskom-language-codes sv
......
...@@ -92,6 +92,15 @@ If BEFORE is not in the list, then insert EL at the end of the list." ...@@ -92,6 +92,15 @@ If BEFORE is not in the list, then insert EL at the end of the list."
(cons el (memq before list))) (cons el (memq before list)))
list))) list)))
(defun lyskom-move-in-list (el list pos)
"Destructively move EL within LIST so it appears at position POS."
(when (memq el list)
(setq list (delq el list))
(cond ((eq 0 pos) (setq list (cons el list)))
(t (setcdr (nthcdr (1- pos) list)
(cons el (nthcdr pos list))))))
list)
;;; ;;;
;;; +++ FIXME: If cl.el can be guaranteed, this is pointless. ;;; +++ FIXME: If cl.el can be guaranteed, this is pointless.
;;; ;;;
......
...@@ -1176,6 +1176,8 @@ Users are encouraged to use their best sense of humor." ...@@ -1176,6 +1176,8 @@ Users are encouraged to use their best sense of humor."
kom-add-private-answer kom-add-private-answer
kom-add-no-comments kom-add-no-comments
kom-add-request-confirm kom-add-request-confirm
kom-review-mail-headers
)) ))
;;; ================================================================ ;;; ================================================================
......
...@@ -85,18 +85,58 @@ Note that this function must not be called asynchronously." ...@@ -85,18 +85,58 @@ Note that this function must not be called asynchronously."
(setq todo 'next-text)) (setq todo 'next-text))
(blocking-do-multiple ((text-stat (get-text-stat text-no)) (blocking-do-multiple ((text-stat (get-text-stat text-no))
(text (get-text text-no))) (text (get-text text-no)))
(if (and text-stat (if (and text-stat text)
text)
(progn (progn
(run-hooks 'lyskom-view-text-hook) (run-hooks 'lyskom-view-text-hook)
;; Use a marker, because the buffer may lose data ;; Use a marker, because the buffer may lose data
;; at the top if kom-max-buffer-size is set. ;; at the top if kom-max-buffer-size is set.
(setq start (point-max-marker)) (setq start (point-max-marker))
(lyskom-format-insert "%#1n " (lyskom-format-insert "%#1n " text-stat)
text-stat) (let ((mx-date (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 21)))
(lyskom-print-date-and-time (text-stat->creation-time (mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 17)))
text-stat) (mx-author (car (lyskom-get-aux-item (text-stat->aux-items text-stat) 16)))
'time-y-m-d-h-m) (mx-to (lyskom-get-aux-item (text-stat->aux-items text-stat) 19))
(mx-cc (lyskom-get-aux-item (text-stat->aux-items text-stat) 20))
(mx-filename (lyskom-get-aux-item (text-stat->aux-items text-stat) 10104))
(mx-sender (lyskom-get-aux-item (text-stat->aux-items text-stat) 10103))
(mx-reply-to (lyskom-get-aux-item (text-stat->aux-items text-stat) 28)))
;; Insert date
(if mx-date
(if (and
(condition-case nil
(progn (require 'calendar)
(require 'cal-iso)
t)
nil)
(string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\) \\([0-9][0-9]\\):\\([0-9][0-9]\\):\\([0-9][0-9]\\) \\([-+][0-9][0-9]\\)?\\([0-9][0-9]\\)?"
(aux-item->data mx-date)))
(let* ((secs (string-to-number (match-string 6 (aux-item->data mx-date))))
(mins (string-to-number (match-string 5 (aux-item->data mx-date))))
(hour (string-to-number (match-string 4 (aux-item->data mx-date))))
(mday (string-to-number (match-string 3 (aux-item->data mx-date))))
(mon (string-to-number (match-string 2 (aux-item->data mx-date))))
(year (string-to-number (match-string 1 (aux-item->data mx-date))))
(tzhr (match-string 7 (aux-item->data mx-date)))
(tzmin (or (match-string 8 (aux-item->data mx-date)) ""))
(wday (elt
(calendar-iso-from-absolute
(calendar-absolute-from-gregorian
(list mon mday year)))
1)))
(lyskom-print-date-and-time
(lyskom-create-time secs mins hour mday mon (- year 1900) wday 0 nil))
(when tzhr
(lyskom-format-insert " %#1s%#2s " tzhr tzmin)))
(lyskom-format-insert (aux-item->data mx-date)))
(lyskom-print-date-and-time (text-stat->creation-time
text-stat)
'time-y-m-d-h-m))
;; Insert number of lines
(lyskom-insert (lyskom-insert
(if (= 1 (text-stat->no-of-lines text-stat)) (if (= 1 (text-stat->no-of-lines text-stat))
(lyskom-get-string 'line) (lyskom-get-string 'line)
...@@ -107,12 +147,61 @@ Note that this function must not be called asynchronously." ...@@ -107,12 +147,61 @@ Note that this function must not be called asynchronously."
2 ; compatibility with old KOM. /lw 2 ; compatibility with old KOM. /lw
n))))) n)))))
(if (eq filter 'dontshow) ;; Insert the author
(lyskom-format-insert "%#1P %#2s\n"
(text-stat->author text-stat) (lyskom-insert (or (lyskom-format-mx-author mx-from mx-author) ""))
(lyskom-get-string 'filtered)) (unless (or mx-from mx-author)
(lyskom-format-insert "%#1P\n" (lyskom-format-insert "%#1P" (text-stat->author text-stat)))
(text-stat->author text-stat)))
;; Insert filtration prompt
(when (eq filter 'dontshow)
(lyskom-insert " ")
(lyskom-insert (lyskom-get-string 'filtered)))
(lyskom-insert "\n")
;; Insert sender
(when mx-sender
(lyskom-format-insert 'envelope-sender
(aux-item->data (car mx-sender))))
(when mx-filename
(lyskom-format-insert 'attachment-filename
(aux-item->data (car mx-filename))))
;; Insert imported at
(cond ((and mx-from (text-stat->author text-stat))
(lyskom-format-insert 'text-imported-at-by
(lyskom-return-date-and-time (text-stat->creation-time
text-stat)
'time-y-m-d-h-m)
(text-stat->author text-stat)))
(mx-from
(lyskom-format-insert 'text-imported-at
(lyskom-return-date-and-time (text-stat->creation-time
text-stat)
'time-y-m-d-h-m)))
(mx-date (lyskom-format-insert 'text-created-at
(lyskom-return-date-and-time (text-stat->creation-time
text-stat)
'time-y-m-d-h-m))))
(mapcar (lambda (el)
(lyskom-format-insert "%#1s: %#2s\n"
(lyskom-get-string 'mx-Recipient)
(aux-item->data el)))
mx-to)
(mapcar (lambda (el)
(lyskom-format-insert "%#1s: %#2s\n"
(lyskom-get-string 'mx-Extra-recipient)
(aux-item->data el)))
mx-cc)
(mapcar (lambda (el)
(lyskom-format-insert "%#1s: %#2s\n"
(lyskom-get-string 'mx-Reply-to)
(aux-item->data el)))
mx-reply-to)
(setq end (point-max)) (setq end (point-max))
...@@ -144,19 +233,23 @@ Note that this function must not be called asynchronously." ...@@ -144,19 +233,23 @@ Note that this function must not be called asynchronously."
(if lyskom-show-comments ; +++SOJGE (if lyskom-show-comments ; +++SOJGE
(lyskom-print-header-comm (lyskom-print-header-comm
(misc-info->comm-in misc) (misc-info->comm-in misc)
misc)))) misc
text-stat))))
((eq type 'FOOTN-IN) ((eq type 'FOOTN-IN)
(if kom-reading-puts-comments-in-pointers-last (if kom-reading-puts-comments-in-pointers-last
nil nil
(lyskom-print-header-comm (lyskom-print-header-comm
(misc-info->footn-in misc) (misc-info->footn-in misc)
misc))) misc
text-stat)))
((eq type 'COMM-TO) ((eq type 'COMM-TO)
(lyskom-print-header-comm (misc-info->comm-to misc) (lyskom-print-header-comm (misc-info->comm-to misc)
misc)) misc
text-stat))
((eq type 'FOOTN-TO) ((eq type 'FOOTN-TO)
(lyskom-print-header-comm (misc-info->footn-to misc) (lyskom-print-header-comm (misc-info->footn-to misc)
misc)) misc
text-stat))
))) )))
;; ;;
...@@ -238,7 +331,7 @@ Note that this function must not be called asynchronously." ...@@ -238,7 +331,7 @@ Note that this function must not be called asynchronously."
(lyskom-follow-comments text-stat (lyskom-follow-comments text-stat
conf-stat mark-as-read conf-stat mark-as-read
priority build-review-tree))) priority build-review-tree)))
) ))
(lyskom-format-insert 'no-such-text-no text-no)) (lyskom-format-insert 'no-such-text-no text-no))
(let ((aux-items (text-stat->aux-items text-stat))) (let ((aux-items (text-stat->aux-items text-stat)))
(while aux-items (while aux-items
...@@ -530,7 +623,7 @@ blocking-do." ...@@ -530,7 +623,7 @@ blocking-do."
(t (t
"(%#1n)")) "(%#1n)"))
text text
(or author author-name) (or author-name author)
end-dash end-dash
format-flag-string)) format-flag-string))
...@@ -596,11 +689,16 @@ blocking-do." ...@@ -596,11 +689,16 @@ blocking-do."
"Insert the name of a conference at a previously reserved place." "Insert the name of a conference at a previously reserved place."
(let* ((text-stat (elt (defer-info->data defer-info) 0)) (let* ((text-stat (elt (defer-info->data defer-info) 0))
(format-flags (elt (defer-info->data defer-info) 1)) (format-flags (elt (defer-info->data defer-info) 1))
(name (cond (conf-stat (conf-stat->name conf-stat)) (name (cond (conf-stat nil)
((= (defer-info->call-par defer-info) 0) ((= (defer-info->call-par defer-info) 0)
(lyskom-get-string 'person-is-anonymous)) (lyskom-get-string 'person-is-anonymous))
(t (lyskom-format 'person-does-not-exist (t (lyskom-format 'person-does-not-exist
(defer-info->call-par defer-info)))))) (defer-info->call-par defer-info)))))
(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))))
(setq name (or (lyskom-format-mx-author mx-from mx-author) name))
(lyskom-replace-deferred defer-info (lyskom-replace-deferred defer-info
(lyskom-format-text-footer text-stat (lyskom-format-text-footer text-stat
conf-stat conf-stat
...@@ -775,13 +873,13 @@ Args: TEXT-STAT of the text being read." ...@@ -775,13 +873,13 @@ Args: TEXT-STAT of the text being read."
(cond (cond
((eq type 'COMM-IN) ((eq type 'COMM-IN)
(if lyskom-show-comments ;+++SOJGE (if lyskom-show-comments ;+++SOJGE
(lyskom-print-header-comm (misc-info->comm-in misc) misc))) (lyskom-print-header-comm (misc-info->comm-in misc) misc text-stat)))
((eq type 'FOOTN-IN) ((eq type 'FOOTN-IN)
(lyskom-print-header-comm (misc-info->footn-in misc) misc)))))) (lyskom-print-header-comm (misc-info->footn-in misc) misc text-stat))))))
(defun lyskom-print-header-comm (text misc) (defun lyskom-print-header-comm (text misc read-text-stat)
"Get author of TEXT-NO and print a header line." "Get author of TEXT-NO and print a header line."
(let ((text-stat (if kom-deferred-printing (let ((text-stat (if kom-deferred-printing
(cache-get-text-stat text) (cache-get-text-stat text)
...@@ -789,9 +887,9 @@ Args: TEXT-STAT of the text being read." ...@@ -789,9 +887,9 @@ Args: TEXT-STAT of the text being read."
;; Print information about the link ;; Print information about the link
(cond (text-stat (cond (text-stat
(lyskom-insert-header-comm text-stat misc)) (lyskom-insert-header-comm text-stat misc read-text-stat))
((not kom-deferred-printing) ((not kom-deferred-printing)
(lyskom-insert-header-comm text-stat misc)) (lyskom-insert-header-comm text-stat misc read-text-stat))
(t (t
(let ((defer-info (lyskom-create-defer-info (let ((defer-info (lyskom-create-defer-info
'get-text-stat 'get-text-stat
...@@ -800,7 +898,7 @@ Args: TEXT-STAT of the text being read." ...@@ -800,7 +898,7 @@ Args: TEXT-STAT of the text being read."
(point-max-marker) (point-max-marker)
(length lyskom-defer-indicator) (length lyskom-defer-indicator)
nil ; Filled in later nil ; Filled in later
misc))) (list misc read-text-stat))))
(lyskom-format-insert "%#1s\n" lyskom-defer-indicator) (lyskom-format-insert "%#1s\n" lyskom-defer-indicator)
(lyskom-defer-insertion defer-info)))) (lyskom-defer-insertion defer-info))))
...@@ -814,21 +912,43 @@ Args: TEXT-STAT of the text being read." ...@@ -814,21 +912,43 @@ Args: TEXT-STAT of the text being read."
(defun lyskom-insert-deferred-header-comm (text-stat defer-info) (defun lyskom-insert-deferred-header-comm (text-stat defer-info)
(let* ((author (if text-stat (text-stat->author text-stat) nil)) (let* ((author (if text-stat (text-stat->author text-stat) nil))
(misc (defer-info->data defer-info)) (misc (elt (defer-info->data defer-info) 0))
(read-text-stat (elt (defer-info->data defer-info) 1))
(type (misc-info->type misc)) (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)))