aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-02-03 19:22:09 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-02-03 19:22:09 +0100
commit03ca5cc726e0b25d4beedf85ff5ac5cf66fe051f (patch)
tree640e131ddad45d99f4d98e528c1e5173cab1cfd1
parentelogt.el: implement elogt-open-entry (diff)
downloademacs-elogt-03ca5cc726e0b25d4beedf85ff5ac5cf66fe051f.tar.gz
emacs-elogt-03ca5cc726e0b25d4beedf85ff5ac5cf66fe051f.tar.bz2
emacs-elogt-03ca5cc726e0b25d4beedf85ff5ac5cf66fe051f.zip
elogt.el: elogt-open-entry improvements
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r--elogt.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/elogt.el b/elogt.el
index 46ea319..724e973 100644
--- a/elogt.el
+++ b/elogt.el
@@ -122,16 +122,22 @@ A logfile priority level is one of: None, Info, Warn, Error."
;; Table interaction
(defun elogt--entry-logfile-path (table-entry)
- "Return a logfile path of a ElogT TABLE-ENTRY entry."
+ "Return a logfile path of a given ElogT TABLE-ENTRY."
(format "%s/%s:%s:%s.log"
elogt-portage-log-dir
(aref table-entry 1)
(aref table-entry 2)
(aref table-entry 3)))
+(defun elogt--get-tabe-logfile-path ()
+ "Return a logfile path of current ElogT table entry."
+ (elogt--entry-logfile-path (tabulated-list-get-entry)))
+
(defun elogt--open-entry-file ()
- "Open specified ElogT table entry."
- (find-file (elogt--entry-logfile-path (tabulated-list-get-entry))))
+ "Open specified ElogT table entry.
+
+Return opened buffer (done via `find-file')."
+ (find-file (elogt--get-tabe-logfile-path)))
(defun elogt-open-entry ()
"Open specified ElogT table entry and put it in a mode for viewing only."