aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elogt.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/elogt.el b/elogt.el
index 724e973..4b98360 100644
--- a/elogt.el
+++ b/elogt.el
@@ -129,15 +129,15 @@ A logfile priority level is one of: None, Info, Warn, Error."
(aref table-entry 2)
(aref table-entry 3)))
-(defun elogt--get-tabe-logfile-path ()
+(defun elogt--get-table-entry-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.
+ "Open a ElogT table entry at point.
Return opened buffer (done via `find-file')."
- (find-file (elogt--get-tabe-logfile-path)))
+ (find-file (elogt--get-table-entry-logfile-path)))
(defun elogt-open-entry ()
"Open specified ElogT table entry and put it in a mode for viewing only."
@@ -147,12 +147,15 @@ Return opened buffer (done via `find-file')."
(fundamental-mode)
(view-mode))))
+(defun elogt--delete-entry-file ()
+ "Delete a logfile of a entry at point."
+ (delete-file (elogt--get-table-entry-logfile-path)))
+
(defun elogt-delete-entry ()
"Delete specified ElogT table entry."
(interactive)
-
- ;; TODO: Implement.
- nil)
+ (elogt--delete-entry-file)
+ (tabulated-list-delete-entry))
(defun elogt-refresh-table ()
"Refresh the ElogT table."