diff options
author | 2023-02-03 20:45:41 +0100 | |
---|---|---|
committer | 2023-02-03 20:45:41 +0100 | |
commit | fb0aaf5cbf50096f18e8cfc186cd162ed7a0c09b (patch) | |
tree | 5246aee557207df07531fddfe5e7ec72d341b765 | |
parent | elogt.el: show logfile size (diff) | |
download | emacs-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.el | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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." |