'((t :inherit org-agenda-dimmed-todo-face))
"Face used for faded Lurk text.")
+(defface lurk-timestamp
+ '((t :inherit org-agenda-dimmed-todo-face))
+ "Face used for timestamps.")
+
(defface lurk-error
'((t :inherit font-lock-regexp-grouping-construct))
"Face used for Lurk error text.")
(defun lurk-send-msg (msg)
(if lurk-debug
- (lurk-display-string nil (lurk-msg->string msg)))
+ (lurk-display-string nil nil (lurk-msg->string msg)))
(let ((proc (get-process "lurk")))
(if (and proc (eq (process-status proc) 'open))
(process-send-string proc (concat (lurk-msg->string msg) "\r\n"))
(puthash context facelist lurk-context-facelists))
facelist))
-(defun lurk-display-string (context &rest strings)
+(defun lurk-display-string (context prefix &rest strings)
(with-current-buffer (get-buffer-create "*lurk*")
(save-excursion
(goto-char lurk-prompt-marker)
(context-atom (if context (intern context) nil)))
(insert-before-markers
(propertize (concat (format-time-string "%H:%M") " ")
- 'face (lurk-get-context-facelist context)
+ 'face 'lurk-timestamp
'read-only t
'context context
'invisible context-atom)
to
(if (equal to lurk-nick) from to))))
(lurk-display-string
- context
+ context nil
(pcase (lurk-get-context-type to)
('channel (concat to " <" from "> "))
('nick (concat "[" from " -> " to "] "))
to
(if (equal to lurk-nick) from to))))
(lurk-display-string
- context
+ context nil
"* " from " " action-text)))
(defun lurk-display-notice (context &rest notices)
(lurk-display-string
- context
+ context nil
lurk-notice-prefix " "
(apply #'concat notices)))
(defun lurk-display-error (&rest messages)
(lurk-display-string
- nil
+ nil nil
lurk-error-prefix " "
(apply #'concat messages)))
(defun lurk-eval-msg-string (string)
(if lurk-debug
- (lurk-display-string nil string))
+ (lurk-display-string nil nil string))
(let* ((msg (lurk-string->msg string)))
(pcase (lurk-msg-cmd msg)
("PING"