@@ -81,24 +81,31 @@ put cursor to CHECKPOINT."
81
81
" \n "
82
82
(gethash " body" msg) " \n " ))
83
83
84
-
85
84
(defun make-message-header (msg )
86
85
" Make message header from MSG hash."
87
- (concat
88
- (concat " ID: " (gethash " id" msg) " \n " )
89
- (concat " From: " (gethash " author" msg) " [" (gethash " address" msg) " ]" " \n " )
90
- (concat " To: " (gethash " recipient" msg) " \n " )
91
- (concat " Echo: " (gethash " echo" msg) " \n " )
92
- (concat " At: " (gethash " time" msg) " \n " )
93
- (concat " Subject: " (gethash " subj" msg) " \n " )))
86
+ (insert (concat " ID: " (gethash " id" msg) " \n " ))
87
+ (insert " From: " )
88
+ (if (not (string-equal (gethash " repto" msg) " " ))
89
+ (insert-button (concat (gethash " author" msg) " [" (gethash " address" msg) " ]" )
90
+ 'action (lambda (x ) (display-message-hash
91
+ (idec-db-get-message-by-id
92
+ (gethash " repto" (button-get x 'msg ))
93
+ (gethash " echo" (button-get x 'msg )))))
94
+ 'msg msg)
95
+ (insert (concat (gethash " author" msg) " [" (gethash " address" msg) " ]" )))
96
+ (insert " \n " )
97
+ (insert (concat " To: " (gethash " recipient" msg) " \n " ))
98
+ (insert (concat " Echo: " (gethash " echo" msg) " \n " ))
99
+ (insert (concat " At: " (gethash " time" msg) " \n " ))
100
+ (insert (concat " Subject: " (gethash " subj" msg) " \n " )))
94
101
95
102
(defun display-message-hash (msg )
96
103
" Disaply message MSG in new buffer."
97
104
(mark-message-read (gethash " id" msg) (gethash " echo" msg))
98
105
(with-output-to-temp-buffer (get-buffer-create (concat " *IDEC: " (gethash " subj" msg) " *" ))
99
106
(switch-to-buffer (concat " *IDEC: " (gethash " subj" msg) " *" ))
100
107
(setq start (point ))
101
- (princ ( make-message-header msg) )
108
+ (make-message-header msg)
102
109
(princ (concat " __________________________________\n\n "
103
110
(replace-in-string " \r " " " (gethash " body" msg))))
104
111
(princ " \n __________________________________\n " )
0 commit comments