diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-02-03 19:31:09 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-02-03 19:31:09 +0100 |
commit | 4a4bfccb9bb99bcd77e5423ff6df5c5bfc56f35e (patch) | |
tree | ee0366b3def6502699edc8a9a24c0e58a9e5a1d6 | |
parent | elogt.el: elogt-open-entry improvements (diff) | |
download | emacs-elogt-4a4bfccb9bb99bcd77e5423ff6df5c5bfc56f35e.tar.gz emacs-elogt-4a4bfccb9bb99bcd77e5423ff6df5c5bfc56f35e.tar.bz2 emacs-elogt-4a4bfccb9bb99bcd77e5423ff6df5c5bfc56f35e.zip |
elogt.el: implement elogt-delete-entry
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
-rw-r--r-- | elogt.el | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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." |