aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-02-03 20:45:41 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-02-03 20:45:41 +0100
commitfb0aaf5cbf50096f18e8cfc186cd162ed7a0c09b (patch)
tree5246aee557207df07531fddfe5e7ec72d341b765
parentelogt.el: show logfile size (diff)
downloademacs-elogt-fb0aaf5cbf50096f18e8cfc186cd162ed7a0c09b.tar.gz
emacs-elogt-fb0aaf5cbf50096f18e8cfc186cd162ed7a0c09b.tar.bz2
emacs-elogt-fb0aaf5cbf50096f18e8cfc186cd162ed7a0c09b.zip
elogt.el: propertize "package" and "time"
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r--elogt.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/elogt.el b/elogt.el
index c5c20a6..f5d7fd9 100644
--- a/elogt.el
+++ b/elogt.el
@@ -123,9 +123,15 @@ A logfile priority level is one of: None, Info, Warn, Error."
(defun elogt--logfile-properties (file-name)
"Extract the properties form given FILE-NAME."
- (apply #'vector `(,(elogt--logfile-priority-level file-name)
- ,@(split-string (file-name-base file-name) ":")
- ,(elogt--file-size file-name))))
+ (let* ((splitted-file-name (split-string (file-name-base file-name) ":"))
+ (category (car splitted-file-name))
+ (package (cadr splitted-file-name))
+ (time (caddr splitted-file-name)))
+ (vector (elogt--logfile-priority-level file-name)
+ category
+ (propertize package 'face 'bold)
+ (propertize time 'face 'italic)
+ (elogt--file-size file-name))))
(defun elogt--make-log-table-contents ()
"Make ElogT table contents."
@@ -145,8 +151,8 @@ A logfile priority level is one of: None, Info, Warn, Error."
(format "%s/%s:%s:%s.log"
elogt-portage-log-dir
(aref table-entry 1)
- (aref table-entry 2)
- (aref table-entry 3)))
+ (substring-no-properties (aref table-entry 2))
+ (substring-no-properties (aref table-entry 3))))
(defun elogt--get-table-entry-logfile-path ()
"Return a logfile path of current ElogT table entry."