The Lambda Lab
/
projects
/
lurk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0aadfe
)
Added timestamp face.
author
Tim Vaughan
<plugd@thelambdalab.xyz>
Tue, 6 Jul 2021 08:05:43 +0000
(10:05 +0200)
committer
Tim Vaughan
<plugd@thelambdalab.xyz>
Tue, 6 Jul 2021 08:05:43 +0000
(10:05 +0200)
lurk.el
patch
|
blob
|
history
diff --git
a/lurk.el
b/lurk.el
index
0c9c31b
..
cad38b9
100644
(file)
--- a/
lurk.el
+++ b/
lurk.el
@@
-77,6
+77,10
@@
'((t :inherit org-agenda-dimmed-todo-face))
"Face used for faded Lurk text.")
'((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.")
(defface lurk-error
'((t :inherit font-lock-regexp-grouping-construct))
"Face used for Lurk error text.")
@@
-160,7
+164,7
@@
(defun lurk-send-msg (msg)
(if lurk-debug
(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"))
(let ((proc (get-process "lurk")))
(if (and proc (eq (process-status proc) 'open))
(process-send-string proc (concat (lurk-msg->string msg) "\r\n"))
@@
-397,7
+401,7
@@
portion of the source component of the message, as LURK doesn't use this.")
(puthash context facelist lurk-context-facelists))
facelist))
(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)
(with-current-buffer (get-buffer-create "*lurk*")
(save-excursion
(goto-char lurk-prompt-marker)
@@
-408,7
+412,7
@@
portion of the source component of the message, as LURK doesn't use this.")
(context-atom (if context (intern context) nil)))
(insert-before-markers
(propertize (concat (format-time-string "%H:%M") " ")
(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)
'read-only t
'context context
'invisible context-atom)
@@
-424,7
+428,7
@@
portion of the source component of the message, as LURK doesn't use this.")
to
(if (equal to lurk-nick) from to))))
(lurk-display-string
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 "] "))
(pcase (lurk-get-context-type to)
('channel (concat to " <" from "> "))
('nick (concat "[" from " -> " to "] "))
@@
-437,19
+441,19
@@
portion of the source component of the message, as LURK doesn't use this.")
to
(if (equal to lurk-nick) from to))))
(lurk-display-string
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
"* " 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
lurk-notice-prefix " "
(apply #'concat notices)))
(defun lurk-display-error (&rest messages)
(lurk-display-string
- nil
+ nil
nil
lurk-error-prefix " "
(apply #'concat messages)))
lurk-error-prefix " "
(apply #'concat messages)))
@@
-520,7
+524,7
@@
portion of the source component of the message, as LURK doesn't use this.")
(defun lurk-eval-msg-string (string)
(if lurk-debug
(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"
(let* ((msg (lurk-string->msg string)))
(pcase (lurk-msg-cmd msg)
("PING"